selectable text field
selectable text field
- Subject: selectable text field
- From: Ken Victor <email@hidden>
- Date: Thu, 11 Oct 2007 09:00:21 -0700
i have a (small) nstextfield bound to a method in my controller. the
text field is set (in ib) selectable, but not editable. my method
returns a NSAttributedString, that contains two strings separated by
a slash character. one or the other or both of the strings will
either be red or black (ie, have no fore ground color attribute). if
i don't do anything special, when i select anything in the field, the
text all turns black, and stays black until the contents of the field
get changed via my above method. on the other hand, if i set the text
field to allow edditing of text attributs, via
setAllowsEditingTextAttributes, then altho the text stays red when
selected, when selected the text moves down a pixel and the text
seems to condense.
how can i make this field selectable and not have the text shift
position, layout, and color when selected?
thanx,
ken
ps. this can easily be seen by making a small cocoa document based
appliction that only has a NSTextField and some other field that can
accept focus.
_______________________________________________
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