FROM : Keith Blount
DATE : Fri Apr 15 23:07:47 2005
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
DATE : Fri Apr 15 23:07:47 2005
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
| Related mails | Author | Date |
|---|---|---|
| No related mails found. | ||






Cocoa mail archive

