• 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
Problem with setting fonts in NSTextView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Problem with setting fonts in NSTextView


  • Subject: Problem with setting fonts in NSTextView
  • From: rethish <email@hidden>
  • Date: Fri, 09 Jan 2009 16:37:45 +0530

Hi all,


In my sample application I use a textview and popupbutton(in which all the
available fonts a shown at runtime).

For this, i use the code:

    NSArray *path=[[NSFontManager alloc]  availableFonts];

    [popup addItemsWithTitles:path];

We can set the font in the textview

Using:     [textview setFont:fontobj];

Where fontobj is an object of nsfont.

But the problem is ,if we select any item from the popupbutton ,the entire
text's font is changed from the textview.

I really want to set font whenever we select an item

i e.,
If I first select "Arial" font, the text entered should be in that font
after that ,if I select "Impact"font , the text entered from the current
position should be in that font--(AS IN TEXTEDIT).


Please help..

Thankyou.
regards



_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Problem with setting fonts in NSTextView
      • From: Graham Cox <email@hidden>
  • Prev by Date: Re: Custom tracking in a NSTextFieldCell
  • Next by Date: Re: CALayer not displaying masked CGImage properly
  • Previous by thread: Re: NSTextView bindings; value path
  • Next by thread: Re: Problem with setting fonts in NSTextView
  • Index(es):
    • Date
    • Thread