• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSComboxBox alternative
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

References: 
 >NSComboxBox does not keep scrolled‏ (From: FirstName LastName <email@hidden>)
 >NSComboxBox alternative (From: FirstName LastName <email@hidden>)
 >Re: NSComboxBox alternative (From: Peter Lübke <email@hidden>)
 >Re: NSComboxBox alternative (From: Lee Ann Rucker <email@hidden>)
 >RE: NSComboxBox alternative (From: FirstName LastName <email@hidden>)
 >Re: NSComboxBox alternative (From: Kyle Sluder <email@hidden>)
 >RE: NSComboxBox alternative (From: FirstName LastName <email@hidden>)

  • Prev by Date: Re: could not locate an NSManagedObjectModel
  • Next by Date: Re: Getting NSScrollView to ignore scrolling
  • Previous by thread: RE: NSComboxBox alternative
  • Next by thread: RE: NSComboxBox alternative
  • Index(es):
    • Date
    • Thread