nspopupbuttoncell attribs
nspopupbuttoncell attribs
- Subject: nspopupbuttoncell attribs
- From: "William Zumwalt" <email@hidden>
- Date: Sun, 10 Feb 2008 22:20:01 -0600
Hi,
I've got two questions releated to NSPopUpButtonCell.
In my dataCellForRow: method, I'm trying to set the text color but I'm not
finding a way to do this with an NSPopUpButtonCell like there is for
NSTextFieldCell which uses setTextColor:. How is this done?
Also, in this same method and same control, I'm trying to get rid of the
checkbox that appears when the popup is enabled in order to match the text
alignment of the NSPopUpButtonCell with the other NSTextFieldCell's in the
same column so that they are all left aligned.
- (id) dataCellForRow:(int) row
...
cell = [[NSPopUpButtonCell alloc] init];
[cell setBordered:NO];
[cell setPullsDown:NO];
[cell setFont:[NSFont labelFontOfSize:[NSFont smallSystemFontSize]]];
[cell setControlSize:NSMiniControlSize];
//[cell setAlignment:NSLeftTextAlignment]; no need, default
[cell setEditable:YES];
[cell addItemWithTitle:@"Item A"];
[cell addItemWithTitle:@"Item B"];
[cell setState:NSOffState];
The setState: isn't making the checkbox go away which is my understanding of
what it's for. What am I doing wrong there?
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden