Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Is there someway to disable NSComboBoxCell's drop down menus?



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:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden

References: 
 >Is there someway to disable NSComboBoxCell's drop down menus? (From: "Theodore H. Smith" <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.