Re: Typing attributes for a rich NSField
Re: Typing attributes for a rich NSField
- Subject: Re: Typing attributes for a rich NSField
- From: "Louis C. Sacha" <email@hidden>
- Date: Sat, 4 Dec 2004 14:37:05 -0800
Hello...
You should be able to use the windowWillReturnFieldEditor:toObject:
in the delegate of the associated NSWindow to return your own
instance of NSTextView to be used as the field editor for that
NSTextfield object.
You can set up an instance of NSTextView with whatever
attributes/settings you want, including using setTypingAttributes: to
set the default attributes. Depending on how many of these text
fields exist and how often they are being edited, you may want to
create your own single shared NSTextField that is cached/saved
somewhere and is used as the field editor for all of those fields (as
opposed to creating a new one each time editing is necessary).
Hope that helps,
Louis
NSTextView has the setTypingAttributes: method which allows you to
establish the attributes for text to be entered into the view before
the user starts typing.
NSTextField has been given the ability to edit rich text within the
field, is there an equivalent functionality to setTypingAttributes?
I've looked in NSTextField and NSControl and such to no avail. I
suspect this is a "hard" problem because the field editor gets
involved.
Scott
_______________________________________________
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