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 (Cocoa-dev@lists.apple.com) 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com