I'm having problems scripting a text element within a class to become
multiline - at present it only works when I specify both the width
and the height. Here's a simple test case:
<canvas proxied="false" debug = "true">
<class name="tester">
<attribute name="multi" type = "number" value="0" />
<attribute name="text" type = "text" />
<text name = "t" resize = "true" text = "${parent.text}" >
<method event = "oninit"><![CDATA[
if (parent.multi>0){
this.multiline = true;
this.setWidth(parent.multi);
//this.setHeight(parent.multi);
Debug.write("Multiline is " +
this.multiline);
Debug.write("Width is " + this.width);
Debug.write("Height is " + this.height);
}
]]>
</method>
</text>
</class>
<tester multi = "50" >Here's some text that should wrap over several
lines</tester>
</canvas>
I've tried various combinations in place of "this.multiline = true",
including "this.setAttribute('multiline', true) but can't get a
result unless I uncomment the setHeight line, which isn't ideal. (I
understand this forces the multiline attribute to true). Can anyone
see how I could get it working using only width and multiline?
(Laszlo version 3.2cr2 - SOLO)
Many thanks
Nick
_______________________________________________
Laszlo-user mailing list
[email protected]
http://www.openlaszlo.org/mailman/listinfo/laszlo-user