Article View: comp.sys.next.programmer
Article #583Help: Text in ScrollView
From: cjones
Date: Tue, 07 Apr 1992 23:00
Date: Tue, 07 Apr 1992 23:00
28 lines
1497 bytes
1497 bytes
I am somewhat new to the NeXT scene, so please excuse my ignorance. I would like to output text in several different styles and sizes to a text object in a ScrollView (ScrollView was pasted from IB). As I understand it, all I have to do is send a setMonoFont:NO message to the docView in the ScrollView and then I can write text in multiple styles,etc. However this does not work. I enclose some sample code: theText=[theScrollView docView]; [theText setDelegate:self]; [theText setMonoFont:NO]; endPos=[theText textLength]; [theText setSel:endpos :endPos]; [theText replaceSel:"Some Text\n"]; endPos=[theText textLength]; [theText setSel:endpos :endPos]; [theText setSelFontSize:24.0]; [theText replaceSel:"Some Text in 24pt\n"]; All I get is both text lines in the default font size. Is there something else I need to do to get the text object to allow multiple sizes,etc? I am doing something wrong with the selection code? Any assistance would be greatly appreciated. Please send e-mail to cjones@cornerstone.com. Thanks in advance! Christopher Jones
Technical Details
Message-ID:
<1992Apr7.230028.8575@cornerstone.com>Path:
arc1-ca.pugleaf.net!sparky!uunet!nntp1.radiomail.net!cornerstone!newsShow Full Headers
Complete Article Headers
Newsgroups: comp.sys.next.programmer Path: arc1-ca.pugleaf.net!sparky!uunet!nntp1.radiomail.net!cornerstone!news From: cjones@cornerstone.com () Subject: Help: Text in ScrollView Message-ID: <1992Apr7.230028.8575@cornerstone.com> Sender: news@cornerstone.com Nntp-Posting-Host: khayman Reply-To: (Christopher Jones) Organization: Cornerstone Research Date: Tue, 7 Apr 1992 23:00:28 GMT