Problem with setting fonts in NSTextView
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