Re: Is there someway to disable NSComboBoxCell's drop down menus?
Re: Is there someway to disable NSComboBoxCell's drop down menus?
- Subject: Re: Is there someway to disable NSComboBoxCell's drop down menus?
- From: Clark Cox <email@hidden>
- Date: Thu, 30 Jun 2005 10:13:22 -0400
On 6/30/05, Theodore H. Smith <email@hidden> wrote:
> In this app I'm working on, I have some comboboxes, in an
> NSTableView. Because they are in an NSTableView, I must use
> NSComboBoxCell for every row of the column, despite that sometimes
> NSComboBoxCell is overkill.
>
>
> Some rows have a set of allowable values. Some rows let the user
> enter any value. For the restricted value range, the combobox is
> perfect.
You don't have to use the same cell for every row in the column. If
you su8bclass NSTableColumn, you can have it return a different cell
for each row. That way, you can use the standard NSTextFieldCell for
your free-form cells, and NSComboBoxCell for the more structured ones.
Just override:
- (id)dataCellForRow:(int)row;
--
Clark S. Cox III
email@hidden
http://www.livejournal.com/users/clarkcox3/
http://homepage.mac.com/clarkcox3/
_______________________________________________
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