Lefora Free Forum
login join
Loading
392 views

remove formatting from NSTextView

Page 1
1–2
regular - member
54 posts

I have a textView I am cutting text from, manipulating that code in some methods then reinserting back into the textview. My problem is when I reinsert the text the textView is using some "leftover" formatting from the original text, like bold and size xx. I just want the new text to be plain unformatted text, like if you strted typing in a clean fresh textView. I am pretty sure nstextView has a set Font method but what is the "default"?

Thank you,
                  Todd

novice - member
25 posts

todd try this for Font.. i couldnt get the exact font but you can use what ever font you want for the Default font. but the closes i got was this :


NSFont * dFont = [NSFont fontWithName:@"Helvetica" size:13.5];

[textFOutlet setFont:dFont];

if ([textFOutlet font] != dFont) {

[textFOutlet setFont:dFont];

}




Page 1
1–2

Locked Topic


You must be a member to post in this forum

Join Now!