Re: Utility/Floating window with titlebar on left side
Re: Utility/Floating window with titlebar on left side
- Subject: Re: Utility/Floating window with titlebar on left side
- From: "Kyle Sluder" <email@hidden>
- Date: Thu, 18 Sep 2008 03:08:04 -0400
On Wed, Sep 17, 2008 at 3:04 PM, Nick Beadman <email@hidden> wrote:
> The issue I am having is that I want my NSPanel to have the title bar on the
> (left) side. In Carbon there is an WindowAttribute
> (kWindowSideTitlebarAttribute) which makes this trivial but I can't find
> anything equivalent in Cocoa.
Hrm. Unless your window looks like the Formula bar in Excel, perhaps
this isn't the best idea. But whatever, we'll roll with it. In any
case, file an enhancement request at http://bugreport.apple.com and
see if Apple gives word on this feature.
> Searching found an item on cocodev
> <http://www.cocoadev.com/index.pl?TitlebarOnSide> which suggests that this
> isn't possible and suggests subclassing NSWindow using
> NSBorderlessWindowMask which directed me to the "RoundTransparentWindow"
> sample. Of course, the issue with this is that the entire title bar, all of
> the close/minimize/maximize buttons and resize box have to be custom
> controls which is not an insignificant amount of work.
Psst... +[NSWindow standardWindowButton:]. :)
> More searching suggested that the controls in the window created by Carbon
> and initWithWindowRef: would have to be Carbon controls even though it would
> be much easier in this case that they be Cocoa. The solution in Leopard
> appears to be HICocoaView but that isn't an option for me as the application
> has to run on Tiger (10.4) too.
You should be creating your controls in the nib. Though this does
present an interesting question of whether it's possible to provide
the desired mask using a Carbon nib.
--Kyle Sluder
_______________________________________________
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