🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: comp.sys.next.programmer
1 messages
1 total messages Started by cjones Tue, 07 Apr 1992 23:00
Help: Text in ScrollView
#583
Author: cjones
Date: Tue, 07 Apr 1992 23:00
28 lines
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
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads