Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
General
GeneralPortable MacsHardwareNetworking
Applications
Mac ApplicationsEudoraFirefox / MozillaInternet ExplorerOutlook ExpressMS OfficeEntourageExcelPowerPointWordVirtual PCMedia PlayerOther MS Products
Programming
Mac ProgrammingCodeWarriorPerl
Country Specific
Australian Mac GroupUK Mac Group

Mac Forum / Programming / Mac Programming / September 2006



Tip: Looking for answers? Try searching our database.

can to change font of nstextview withcurrent fontsize?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Noufal - 26 Sep 2006 10:33 GMT
Hai
    I am newbie in cocoa pleeas help
I want to change font of NsTextView with current size of text in text
view.I changed the font cant keep the current size.How get the current
size of NsTextView to put in size field of setfont in nstextview.
Itried the given code pleas help wat change i should do to achiev my
aim.

    for (tabindex=0;tabindex <[mytabview numberOfRows];tabindex++) {

        if ([mytabview isRowSelected:tabindex]) {

            myfont =[fontnames objectAtIndex:tabindex];
            textfon=[NSFont fontWithName:myfont size:15];
        }
    }
    if (textfon!=nil) {
       
        [mytextviewchar setFont:textfon];
    }

With thanks.
Andrea Nall - 27 Sep 2006 01:34 GMT
> Hai
>      I am newbie in cocoa pleeas help
[quoted text clipped - 3 lines]
> Itried the given code pleas help wat change i should do to achiev my
> aim.

How about [[aTextField font] pointSize]
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.