Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

rethish

macrumors member
Original poster
Oct 16, 2008
41
0
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
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.