[Laszlo-user] problem "passing" attributes

P T Withington ptw at openlaszlo.org
Tue Mar 14 13:43:11 EST 2006


Google "laszlo text resize"

On 2006-03-14 13:35 EST, William Krick wrote:

> I have a class that wraps a text control.
>
> I want to be able to set the text on an instance of the class and  
> have it
> affect the text attribute of the inner text control.
>
> The code below demonstrates what I'm trying to do.  Note that while it
> almost works, the text gets cut off.  It appears that the inner  
> text control
> is using some sort of default width instead of sizing to the text.
>
> What is the "correct" way to code something like this in laszlo?
>
>
>
> <canvas width="500" height="300">
>
>   <class name="label" extends="view" bgcolor="yellow" height="22">
>     <attribute name="text" type="string" value=""/>
>     <text y="2" text="${parent.text}"/>
>   </class>
>
>   <view width="250" height="24" bgcolor="black">
>     <label x="1" y="1" width="248" text="ABCDEFGHIJKLMNOPQRSTUVWXYZ"/>
>   </view>
>
> </canvas>
>
> _______________________________________________
> Laszlo-user mailing list
> Laszlo-user at openlaszlo.org
> http://www.openlaszlo.org/mailman/listinfo/laszlo-user



More information about the Laszlo-user mailing list