Re: Making combo box popup wide enough
Re: Making combo box popup wide enough
- Subject: Re: Making combo box popup wide enough
- From: Glen Simmons <email@hidden>
- Date: Thu, 6 Oct 2005 16:45:30 -0500
On Oct 6, 2005, at 4:21 PM, Shaun Wexler wrote:
On Oct 6, 2005, at 1:25 PM, Glen Simmons wrote:
NSComboBox, Cocoa's red-headed stepchild, doesn't do a very good
job of displaying its list of choices. Unlike NSPopupButton, which
shows the full width of its items, NSComboBox truncates them. How
can I get it to do the right thing and show all of its choices?
And making the control wider is not an option since the choices
may change / be localized.
To pop-up, NSComboBoxCell creates a borderless NSWindow containing
a NSTableView with one NSTableColumn. You can access these private
objects using a category:
@interface NSComboBoxCell (PrivateAccessorHack)
- (NSTableView *)tableView;
@end
@implementation NSComboBoxCell (PrivateAccessorHack)
- (NSTableView *)tableView
{
return _tableView;
}
@end
I assume you can figure it out from there...
Thanks for the suggestion, but I generally dislike using private
accessors. Anyone have a publicly accessible alternative?
_______________________________________________
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