Re: NSPopUpButton item size
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