• 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
Changing Fonts From a Toolbar
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Changing Fonts From a Toolbar


  • Subject: Changing Fonts From a Toolbar
  • From: Millennium <email@hidden>
  • Date: Thu, 21 Feb 2002 23:16:04 -0500

I've got an NSTextView, and I want to add Bold, Italic, and Underline
buttons to the toolbar for that window. The problem is, these need to
change only the selected text (or the font traits at the insertion point,
if there's no text selected), rather than changing all of the text in the
view. The effect I want is like the corresponding items in the Format menu.

The problem is, I can't figure ou how best to do this. I tried
subclassing NSToolbarItem to make the items respond to the tag: message,
so that I could use addFontTrait (like the menu items do), but it doesn't
seem to work. And I can't seem to find anything in the docs which works
the way I need. Anyone here have any ideas?
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

References: 
 >Re: Quartz call to generate shadows? (From: email@hidden)

  • Prev by Date: IB question
  • Next by Date: Re: How to write an NSImage to a JPEG file
  • Previous by thread: Re: Quartz call to generate shadows?
  • Next by thread: Re: Quartz call to generate shadows?
  • Index(es):
    • Date
    • Thread