selectable text field

  • 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.
previous month october 2007 next month
MTWTFSS
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30 31        
Go to today