Re: Checkboxes and NSBox titles
Re: Checkboxes and NSBox titles
- Subject: Re: Checkboxes and NSBox titles
- From: Bill Cheeseman <email@hidden>
- Date: Tue, 12 Jun 2001 17:38:24 -0400
on 6/12/01 8:05 PM, e.sammer at email@hidden wrote:
>
Bill Cheeseman wrote:
>
>
> The newest version of the Aqua HI Guidelines states that it is permissible
>
> to use a checkbox or a pop-up menu as the title of an NSBox. But the current
>
> version of Interface Builder doesn't provide a means to do so.
>
>
>
> Presumably, it can be done programmatically. Could somebody give me a head
>
> start on how to do this? NSBox has a method, titleCell, that returns the
>
> cell holding the title. I imagine that I want to substitute an NSButtonCell
>
> for that cell, but I'm not sure how to go about it.
>
>
>
In my experience, most places where one is "allowed" to specify a
>
different cell class,
>
there is a - setCellClass: or - setCell: method availble. (See NSBrowser
>
or NSTableView
>
for the standard deffinitions). I haven't checked the docs lately, but
>
there might be something
>
similar in NSBox (or something that it inherits from...)
There's nothing like that in NSBox, which inherits directly from NSView. The
NSBox methods seem to be pretty old, and they are plainly geared to the idea
that a title will always be a string.
I'm tempted to try NSCell's setObjectValue method, but the documentation is
cryptic, mentioning a limiting requirement but not explaining it. This may
not be its purpose, but maybe it is. I would end up with a button inside of
a cell -- I guess there's nothing wrong with that.
--
Bill Cheeseman - email@hidden
Quechee Software, Quechee, Vermont, USA
The AppleScript Sourcebook - www.AppleScriptSourcebook.com
Vermont Recipes - www.stepwise.com/Articles/VermontRecipes