Re: NSComboxBox alternative
Re: NSComboxBox alternative
- Subject: Re: NSComboxBox alternative
- From: Kyle Sluder <email@hidden>
- Date: Sun, 20 Feb 2011 15:02:49 -0800
On Sun, Feb 20, 2011 at 11:57 AM, FirstName LastName
<email@hidden> wrote:
> Yes that's exactly the idea, just that I'm using the NSComboBox and an NSButton instead. If the popup list doesn't suffer from the same problem (i.e. Paths filenames and extensions clipped on the right) I'll happily switch. I guess you are talking about a pull-down list.
Any NSTextFieldCell can do what you want. See the documentation for
-[NSTextFieldCell setLineBreakMode:] and -[NSTextFieldCell
setScrollable:]. But to get a quick demo, drop an NSTextFieldCell into
an IB document, set the Layouts setting to "Truncates," and set the
Line Breaks setting to "Truncate Middle" (the option you're asking for
is akin to Truncate Head, but in Mac OS X paths that need to be
truncated are truncated from the middle).
Unfortunately it looks like NSComboBox doesn't respect these flags in
its drop down. It will respect them in the main textfield portion,
however. Regardless, I think NSComboBox is the wrong UI for this
feature.
--Kyle Sluder
_______________________________________________
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