Changing Fonts From a Toolbar
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.