Re: NSTextFieldCell setPlaceholderAttributedString Query
Re: NSTextFieldCell setPlaceholderAttributedString Query
- Subject: Re: NSTextFieldCell setPlaceholderAttributedString Query
- From: Douglas Davidson <email@hidden>
- Date: Fri, 7 Oct 2005 11:12:29 -0700
On Oct 7, 2005, at 11:06 AM, John Bishop wrote:
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?
For attributed strings, alignment is set using NSParagraphStyle and
NSParagraphStyleAttributeName.
Douglas Davidson
_______________________________________________
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