Re: NSPopupButton in NSTableView header?
Re: NSPopupButton in NSTableView header?
- Subject: Re: NSPopupButton in NSTableView header?
- From: Randall Meadows <email@hidden>
- Date: Wed, 11 Feb 2009 13:58:33 -0700
And OF COURSE I find the answer not 10 seconds after pressing
Send...NSTableColumn -setHeaderCell:.
Silly me, I was looking in NSTableHeaderView. What was I thinking?! ;)
On Feb 11, 2009, at 1:40 PM, Randall Meadows wrote:
Is it possible to put a custom view, in this case an NSPopupButton,
in a specific column header of an NSTableView?
I have a table with 3 columns, one of which displays a status for
one of several user-selectable "things" that correspond to the rest
of the data in that row. I currently have the popup button that
selects which "thing's" status is displayed elsewhere in the window,
and it's a little confusing, apparently. I thought if I could put
that popup button directly in the header of that column instead,
it'd be crystal clear.
Is it a matter of subclassing NSTableHeaderView, overriding -
drawRect:, calling super's -drawRect: first, and then placing an
NSPopupButton at the appropriate location (as determined by -
headerRectOfColumn: for my special column?
That seems like a hack, but it's all I could come up with so far.
There doesn't seem to be a way to set a specific cell in the header
view.
_______________________________________________
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