NSComboBox list is incorrect size on first dropdown
NSComboBox list is incorrect size on first dropdown
- Subject: NSComboBox list is incorrect size on first dropdown
- From: Russ <email@hidden>
- Date: Tue, 25 Nov 2008 07:31:13 -0800 (PST)
I have an NSComboBox whose contents (internal list) gets loaded dynamically during the comboBoxWillPopUp notification. It is created with setNumberOfVisibleItems:9 and setHasVerticalScroller:YES. The first time the button is clicked, there is a removeAllItems and then the items are loaded in (over 100 of them) but the drop-down list that appears is only a single item tall and the scrollbar area is present, but plain gray with no scrollbar. All the items are present --- you can click inside the dropdown and then drag up or down to scroll through the list --- but you wouldn't know this from the single-item-high dropdown and disabled scrollbar. If one of the items is selected, that is the one shown in the single-line-high dropdown area. I can read back numberOfVisibleItems and hasVerticalScroller and they are correct, but what appears does not reflect these values.
The SECOND time you click the button, the dropdown comes up the proper height and the scrollbar is present and active.
I've tried a bunch of things inside the notification routine to try to convince it to do the right thing during the first dropdown -- calling noteNumberOfItemsChanged, re-calling setNumberOfVisibleItems and setHasVerticalScroller but with no effect.
How can I convince NSComboBox to do the right thing? Thanks
_______________________________________________
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