Re: Custom cells in tableview
Re: Custom cells in tableview
- Subject: Re: Custom cells in tableview
- From: James Whitwell <email@hidden>
- Date: Sun, 12 Jan 2003 10:33:23 +1100
Hi Joe,
I was having exactly the same problem. I had some luck by subclassing
NSTableColumn, and overriding it's dataCellForRow: to return an
NSComboBoxCell only when that row was being edited ([[self tableView]
editedRow] == row). Otherwise just returning [super dataCellForRow: row]
would give the default (NSTextFieldCell?), so the combo box appears only for
a row/cell that's being edited.
The only thing is, I can't get it to pop up the combo box properly. :/ It
looks like the NSTextFieldCell gets rendered over the top of it, because I
can see a bit of the pop up button on the right hand side, but I can't hit
it. Most annoying. I think this is most likely an initialisation problem
to do with the combo box somehow, but I've not used cells much. The funny
thing is that if I always return a combo box cell from dataCellForRow:, then
the combo box always renders properly (although on every row -- not what I
want).
;) jimmy.
On 12/1/03 5:00 AM, "Joseph Jones" <email@hidden> wrote:
>
Hi,
>
>
I want ti implement a custom combo box cell in my table view, but I
>
want it to work just like the current text editing custom cell does
>
i.e. appear when editing happens and disappear when editing is over. I
>
have tried setting my own cell but the combo box appears for each row
>
in that column 100% of the time, making my table view ugly (in my
>
eyes). What is the most appropriate way of going about this?
>
>
Thanx,
>
joe
>
_______________________________________________
>
cocoa-dev mailing list | email@hidden
>
Help/Unsubscribe/Archives:
>
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
>
Do not post admin requests to the list. They will be ignored.
http://movies.yahoo.com.au - Yahoo! Movies
- What's on at your local cinema?
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.