Placing controls inside a table header view?
Placing controls inside a table header view?
- Subject: Placing controls inside a table header view?
- From: Keith Blount <email@hidden>
- Date: Fri, 15 Apr 2005 14:07:47 -0700 (PDT)
- Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys
Hello,
I want to use a table header view in a similar way to
Xcode, DevonThink and BBEdit - that is, have it above
a text view with popup buttons and buttons inside it
to control navigation/documents that appear inside the
text view. To do this, I have a shrunk-down table view
above my text view so that only its header is visible
(this is the approach DevonThink takes and it works
well for them).
My problem is, how to replace the NSTableHeaderCells
with control cells in such a way as they still look
like table header cells?
For instance, I can place a popup button in a table
header cell like this:
NSTableColumn *column = [tableView
tableColumnWithIdentifier:@"AN_ID"];
MyPopUpButtonCell *cell = [[MyPopUpButtonCell alloc]
init];
[cell setControlSize:NSSmallControlSize];
[column setHeaderCell:cell];
[cell release];
However, this looks ugly, as the popup button's
background doesn't draw like a table header cell. I
have tried setting the bezel style to none, but this
doesn't help.
Does anybody know how I can add controls to a table
header view (ie. replace NSTableHeaderCell with
control cells) in such a way as the header still looks
like a header, like the one in Xcode? I suspect I need
to subclass NSTableHeaderCell and add controls inside
that, but am not quite sure of what approach I need to
take.
Many thanks for any help or advice in advance,
Keith
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
_______________________________________________
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