• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: A very customized window
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: A very customized window


  • Subject: Re: A very customized window
  • From: Ken Thomases <email@hidden>
  • Date: Sat, 16 Apr 2011 08:08:02 -0500

On Apr 16, 2011, at 7:44 AM, eveningnick eveningnick wrote:

> Is it possible to resize a "custom" title-less window using any of
> it's 4 corners?
>
> I want to display a window with a hole inside (A window which looks
> like a frame), and let the user to resize this frame using any of the
> 4 boundaries of such a frame.
>
> Also i am wondering, if i could let the user drag such a "title-less"
> window clicking on the 'fake' title bar?

Sure.  Just handle the mouseDown:, mouseDragged:, and mouseUp: messages, adjusting the frame as appropriate.  NSWindow inherits from NSResponder.  See the discussion of these techniques in the documentation:
http://developer.apple.com/library/mac/documentation/Cocoa/Conceptual/EventOverview/HandlingMouseEvents/HandlingMouseEvents.html#//apple_ref/doc/uid/10000060i-CH6-SW18

See Apple's RoundTransparentWindow sample code for an example.
http://developer.apple.com/library/mac/#samplecode/RoundTransparentWindow/

Also the FunkyOverlayWindow sample code:
http://developer.apple.com/library/mac/#samplecode/FunkyOverlayWindow/


> When the user clicks "in the hole" of the window - inside the frame,
> the click "goes" to the desktop or another window which happened to be
> below?

Yes.  You've asked this repeatedly and been given the answer.  Create a borderless window with a transparent interior.  The same samples illustrate this, too.

Regards,
Ken

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: A very customized window
      • From: eveningnick eveningnick <email@hidden>
References: 
 >A very customized window (From: eveningnick eveningnick <email@hidden>)

  • Prev by Date: A very customized window
  • Next by Date: Re: MPMoviePlayerController
  • Previous by thread: A very customized window
  • Next by thread: Re: A very customized window
  • Index(es):
    • Date
    • Thread