Re: Popup vs pull down menu item missing
Re: Popup vs pull down menu item missing
- Subject: Re: Popup vs pull down menu item missing
- From: Sean Murphy <email@hidden>
- Date: Thu, 27 Sep 2007 22:34:57 -0400
On Sep 27, 2007, at 9:55 PM, Ian Joyner wrote:
I have a popup menu item with 9 items. If I set the pullsDown
property to YES I only get 8 items, whereas 9 items display if it
is NO. (Same behaviour if it is set in IB.) I'm on Tiger 10.4.10.
Does something else need to be set for a pull down menu? This is
certainly breaking the principle of least surprise! Both
NSPopUpButton and NSPopUpButtonCell exhibit this behaviour.
Hey Ian,
It seems like the menu item indexing of pull-down style lists could
be the cause of your trouble:
"Note that in a pull-down list, the first item is stored at index 1,
not index 0 as is the case with pop-up lists or ordinary menus. This
is done so that the pull-down list’s title can be stored at index 0
if necessary. Even when the title is stored at index 0, always change
the buttons title with the setTitle: method."
See <http://developer.apple.com/documentation/Cocoa/Conceptual/
MenuList/Articles/ManagingPopUpItems.html#//apple_ref/doc/uid/
20000274-DontLinkElementID_4> for more info.
- Sean
_______________________________________________
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