I'd like to display a NSComboBox that is narrower than the widest of strings in the list of items, but have the popup list be wide enough so the whole string can be read. But I haven't found a way to have the 'non-tracking' width to be different from the tracking width.
I've tried altering the width in a delegate's comboBoxWillPopUp:, calling [obj setFrame:], but that affects the width of the unclicked area, the scrolling list is still narrow. I've tried subclassing NSComboBox, and doing the same width switching by overriding and wrapping -[NSComboBox mouseDown:], but that seems to cancel the display of the popup altogether. I imagine I could try getting the NSComboBox's menu, and calling -[NSMenu setMinimumWidth:] on it, but that call isn't available until 10.6, and I'm supporting 10.4.11. I don't see how I'd play with NSComboBoxCell, but maybe that's part of the solution. FWIW, I'm using "setButtonBordered:NO". Would someone please cast me a pearl? _______________________________________________ Cocoa-dev mailing list ([email protected]) 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to [email protected]
