[comp.sys.mac.programmer] TCL CStaticText question

frederic@currituck.cs.unc.edu (Robin Fredericksen) (02/19/91)

Can anyone out there tell me why my CStaticText object won't display
itself unless I call FitToEnclosure(,) with at least one true
argument?  I don't want to call it all, because I want the text to be
static in size and position in the window.  FitToEnclosure causes
teh text update region to be large, causing flicker in other parts of the
screen.

The code is:
========================
Str255 TString;
CStaticText *TitleDisplay;
	o
	o
	o
	TString[0] = strlen(MyTitle);
	strcpy(TString+1,MyTitle);
	
	TitleDisplay = (CStaticText *)new(CStaticText);
	TitleDisplay->IStaticText(anEnclosure,this,
			60,10,60,60,sizFIXEDSTICKY,sizFIXEDSTICKY,60);

	TitleDisplay->SetTextString(TString);
	TitleDisplay->SetFontSize(9);
	TitleDisplay->SetAligniHEncl,aVEncl,TRUE);
	TitleDisplay->FitToEnclosure(FALSE, TRUE);
	TitleDisplay->Place(aHEncl,aVEncl,TRUE);

	o
	o
}

Thanks in advance,
Eric Fredericksen
frederic@neuretp.biol.ruu.nl

-- 
-------------------------------------------------------------------------------
Eric Fredericksen	: Insert amazingly funny or enlightening quote
frederic@cs.unc.edu	: in this space here.
I don't need a disclaimer, I'm a graduate student so no one cares what I say...