• 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
Re: NSPopUpButton item size
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSPopUpButton item size


  • Subject: Re: NSPopUpButton item size
  • From: Frank Midgley <email@hidden>
  • Date: Thu, 24 Feb 2005 16:38:27 -0600

On 2005-02-21, at 11.55, Ivan C Myrvold wrote:

How can I change the size of the NSPupUpButton items that I have programmatically created? They are too short, and we can't see the item text at the end.

-[NSControl sizeToFit] only sizes to fit the currently selected item in the pop-up. You have to loop through each item in the pop-up, select it and call -sizeToFit. Keep track of the maximum width you run across and then make the control that wide at the end.


Bug or feature, you decide...

-Frank

------------------------------------
Frank M. Midgley
email@hidden
http://homepage.mac.com/knarf/

_______________________________________________
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


References: 
 >NSPopUpButton item size (From: Ivan C Myrvold <email@hidden>)
 >Re: NSPopUpButton item size (From: j o a r <email@hidden>)
 >Re: NSPopUpButton item size (From: Ivan C Myrvold <email@hidden>)

  • Prev by Date: Re: NSTask not using arguments?
  • Next by Date: RTFD binary format internals
  • Previous by thread: Re: NSPopUpButton item size
  • Next by thread: Overlapping views no more
  • Index(es):
    • Date
    • Thread