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

James Robey circlecycle at gmail.com
Fri Aug 29 11:20:06 PDT 2008


Ah, well,

	In my experience color names are specified using 0x?????? for colors  
in tag attributes, and you seem to be using #?????? sucessfully which  
is not my experience. Regardless, try removing the '#' from the  
oninit handler, to get:

<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>

see if that helps.

On Aug 29, 2008, at 6:29 AM, Marc Bachstein wrote:

> 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
>
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.openlaszlo.org/pipermail/laszlo-user/attachments/20080829/a6489558/attachment.html


More information about the Laszlo-user mailing list