• 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
How do I change the font of selected text in an NSTextView?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: How do I change the font of selected text in an NSTextView?
      • From: Douglas Davidson <email@hidden>
  • Prev by Date: NSProgressIndicator updating
  • Next by Date: NSBezierPath and NSAffineTransform
  • Previous by thread: Re: NSProgressIndicator updating
  • Next by thread: Re: How do I change the font of selected text in an NSTextView?
  • Index(es):
    • Date
    • Thread