[Laszlo-user] multiline text - bug or mistake?

Benjamin Shine ben at laszlosystems.com
Mon Mar 20 12:31:36 EST 2006


The <state> tag does exactly what you want.

On Mar 20, 2006, at 7:09 AM, graphis1 at mac.com wrote:

> HM> I noticed that in the debugger, we have a flag to set the  
> output text area to multiline
> HM> to wrap (call to text.setMultiline()) , and it doesn't take  
> effect until the window's dimensions
> HM> are changed, i.e., dragging the resizer thumb on the debugger  
> pane.
>
> This is interesting Henry. The documentation states that setting  
> multiline to true will force text to rewrap whenever the dimension  
> of the container is changed, or whenever setText() is called.
>
> I've tried to simulate this by calling setWidth() on the container  
> after calling setMultiline(), but it has no effect; the same is  
> true when calling setText() after setMultiline() - the text refuses  
> to wrap after it has been initialised, unless you force both height  
> and width of the container. I'm not sure whether this is the  
> designed behaviour or a bug.
>
> The following would offer a workaround for now, but I'm unsure of  
> the LZX equivalent for the pseudocode:
>
> if a certain attribute is set to true
>     //commit this text element to the page
>     <text multiline = "true" width = whatever etc... />
> else
>    //commit this one instead
> <text multiline = "false" width = whatever etc... />
>
> If someone could chip in on how this kind of logic is achieved in  
> LZX, we'd then have a (slightly ugly) way of scripting the  
> multiline attribute.
>
> Thanks,
>
> Nick
>
>
>
> _______________________________________________
> Laszlo-user mailing list
> Laszlo-user at openlaszlo.org
> http://www.openlaszlo.org/mailman/listinfo/laszlo-user

benjamin shine
software engineer
ben at laszlosystems.com





More information about the Laszlo-user mailing list