• 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
Re: Typing attributes for a rich NSField
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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
References: 
 >Typing attributes for a rich NSField (From: "R. Scott Thompson" <email@hidden>)

  • Prev by Date: Re: Hiding Titlebar from a Window
  • Next by Date: Re: Upper case string in formatter
  • Previous by thread: Typing attributes for a rich NSField
  • Next by thread: newbie question NSMatrix
  • Index(es):
    • Date
    • Thread