[Laszlo-user] cannot set text color of a dynamically generated <text>

Marc Bachstein bachstein at visus-tt.com
Fri Aug 29 06:29:42 PDT 2008


Hello,

I cannot set the text color of a <text> component, which is created
dynamically. In DHTML runtime it works. SWF8 runtime fails.

<canvas>
	<view name="mainView" width="800" height="300" bgcolor="#DDDDDD">
		<!-- this text color is white -->
		<text x="10" y="10" fgcolor="#FFFFFF"
fontsize="18">Test</text>
		
		<handler name="oninit" args=""><![CDATA[
			/* this text color is black !! */
			textComponent = new
lz.text(this,{x:"10",y:"35",fgcolor:"#FFFFFF",fontsize:"18"});
			textComponent.setText("Test");
			]]>
		</handler>
	</view>
</canvas>

Does anybody know a work around for this?

Kind Regards,
Marc




More information about the Laszlo-user mailing list