• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
nspopupbuttoncell attribs
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: nspopupbuttoncell attribs
      • From: Peter Ammon <email@hidden>
    • Re: nspopupbuttoncell attribs
      • From: Nick Toumpelis <email@hidden>
  • Prev by Date: Re: Xcode 3.0, is it missing the Close Project menu item?
  • Next by Date: Core Data Cascade delete rule sometimes doesn't
  • Previous by thread: Re: NSCollectionView Subclass difficulties
  • Next by thread: Re: nspopupbuttoncell attribs
  • Index(es):
    • Date
    • Thread