How do I change the font of selected text in an NSTextView?
How do I change the font of selected text in an NSTextView?
- Subject: How do I change the font of selected text in an NSTextView?
- From: Dave Camp <email@hidden>
- Date: Wed, 9 Mar 2005 17:00:14 -0800
My application has a popup menu with a list of fonts and an NSTextView
with text typed by the user. If the user selects some text and chooses
a font from the menu, I want to change the selected text to that font.
Seem like that should be easy enough to do, but I can't find anything
close. I've been through the NSTextVew, NSText, and NSFontManager APIs
but this eludes me.
I was hoping there would be something similar to [[NSFontManager
sharedFontManager] addFontTrait:sender] which I use for my Bold and
Italics buttons.
Side note: Before I get blasted for not just using the Font panel, my
client is insisting on a font menu and other sundry controls to keep
the Mac UI like their Windows UI...
Thanks,
Dave
---
You are in a maze of testy little Java VMs, all subtly different.
_______________________________________________
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