On Sun, Feb 20, 2011 at 11:57 AM, FirstName LastName
<c0ldp...@hotmail.com> 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 (Cocoa-dev@lists.apple.com)

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 arch...@mail-archive.com

Reply via email to