Re: NSPanel with just a close button & title on title bar?
Re: NSPanel with just a close button & title on title bar?
- Subject: Re: NSPanel with just a close button & title on title bar?
- From: Ricky Sharp <email@hidden>
- Date: Thu, 18 Nov 2004 12:17:47 -0600
On Thursday, November 18, 2004, at 11:44AM, Ken Tabb <email@hidden> wrote:
>I have a very narrow but tall tool palette (NSPanel utility window)
>that needs to have "Tools" written in its title bar, and a single red
>close button. If I design the panel in IB, and only check "close box"
>(not miniaturise or resize) I still get all 3 on the title bar, albeit
>miniaturise & maximise are disabled (but they still take up valuable
>title bar space).
>
>If I attempt the same thing programmatically, using [[NSPanel alloc]
>initWithContentRect:styleMask:backing:defer:] I end up with the same
>situation... the 2 redundant & disabled buttons push the title "Tools"
>half off the edge of the window's title bar.
>
>I searched mamasam and someone in 2002 had this problem but the only
>solution known at the time was to do a Carbon panel. Has anything been
>improved since 2002 does anyone know?
>
>Doesn't it make sense for some types of utility window to not have
>mini/maxi buttons? I mean, a disabled button infers to the user that
>for that specific window it may one day become enabled (otherwise it
>wouldn't be there), yet in my case it will never be enabled for this
>little puppy.
I agree that the window should not show those controls since they'll never be enabled. The following page may be of some use:
<http://www.cocoadev.com/index.pl?NSWindow>
At about the middle of that page, there's a section named "Window border decorations". It shows an undocumented approach to removing the toggle toolbar button. It also mentions that there's supposedly some API introduced in 10.2 to access & remove the "border view buttons". But there's no mention of where that API lives or what it's exactly named.
--
Rick Sharp
Instant Interactive(tm)
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden