FROM : Ricky Sharp
DATE : Thu Nov 18 19:17:47 2004
On Thursday, November 18, 2004, at 11:44AM, Ken Tabb <K.J.<email_removed>> 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)
DATE : Thu Nov 18 19:17:47 2004
On Thursday, November 18, 2004, at 11:44AM, Ken Tabb <K.J.<email_removed>> 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)
| Related mails | Author | Date |
|---|---|---|
| Ken Tabb | Nov 18, 17:50 | |
| Ricky Sharp | Nov 18, 19:17 | |
| Andreas Mayer | Nov 18, 20:20 | |
| Peter Maurer | Nov 19, 08:40 | |
| Ken Tabb | Nov 19, 12:05 | |
| Ryan Stevens | Nov 19, 17:38 | |
| Evan Schoenberg | Nov 19, 22:39 | |
| M. Uli Kusterer | Nov 22, 08:53 | |
| Ryan Stevens | Nov 22, 15:33 | |
| M. Uli Kusterer | Nov 23, 22:36 |






Cocoa mail archive

