• 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
NSTextFieldCell setPlaceholderAttributedString Query
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSTextFieldCell setPlaceholderAttributedString Query


  • Subject: NSTextFieldCell setPlaceholderAttributedString Query
  • From: John Bishop <email@hidden>
  • Date: Fri, 7 Oct 2005 13:06:08 -0500

If I have a NSTextField with centered text (ie: [theNSTextFieldCell alignment]
== NSCenterTextAlignment) and I set the cell's placeholder string:

[theNSTextFieldCell setPlaceholderString:anNSString];

the resulting placeholder is, like any entered text, center aligned, as
expected.  If, however, I set the placeholder with an attributed string:

[theNSTextFieldCell setPlaceholderAttributedString:anNSAttributedString];

the resulting placeholder is left aligned, unlike any entered text, which is
properly centered.  Is this a bug, or am I supposed to supply an alignment
attribute in the placeholder's NSAttributedString?  If it's not a bug, how to
I specify that NSCenterTextAlignment attribute?

Thanks.
------------------------------------------------------------------
John Bishop                       <mailto:email@hidden>
Mulligan Software                <http://www.mulligansoftware.com>
Mulligan's Golf Personal - Stats & Handicapping for the Mac Golfer
 _______________________________________________
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

  • Follow-Ups:
    • Re: NSTextFieldCell setPlaceholderAttributedString Query
      • From: Douglas Davidson <email@hidden>
  • Prev by Date: Dynamically changing scripting dictionary
  • Next by Date: Re: NSTextFieldCell setPlaceholderAttributedString Query
  • Previous by thread: RE: Dynamically changing scripting dictionary
  • Next by thread: Re: NSTextFieldCell setPlaceholderAttributedString Query
  • Index(es):
    • Date
    • Thread