PDA

View Full Version : how to format text


coszmin
10-27-2004, 06:23 AM
So i was in need of some more "advanced" text formatting .
I understand that laszlo works with <text> tags in which you can also have <p> tags . I've looked through the lz in 10 mins , developer reference , component hierarchy and was not able to find an equivalent in laszlo for the very usefull css : text-align which allows centering , positioning text on each side , or justify which streches the spaces to make the text fit equally on each line .

Are there any options in laszlo that would allow me to do the same things ?

thanks

amelard
10-27-2004, 07:11 AM
Hi, in order to align a text, you have to put your text in a view. It is not possible to center the text, however, it is possible to center a view both vertically and horizontally.

exemple:


<view valign="middle" align="center" width="200" height="200">
<text> Bonjour le monde </text>
</view>



Regards,

Alexandre.

coszmin
10-27-2004, 07:36 AM
thanks

so basically there is no way to justify or to make say ... 100 lines of text with no \n or <br> characters sit centered or aligned to the right in a <text> or <view> with width / height = 200 in laszlo ?

that combined with it's inability to accept commands from the jS & DOM enviroenment makes it quite inadequate for web design , i really hope that if these features are missing and not just hidden in the documentation , will be available soon

pcawdron
08-07-2006, 04:06 AM
I think you meant...

<view width="200" height="200" bgcolor="0xffff00" opacity=".3">
<text valign="middle" align="center"> Bonjour le monde </text>
</view>

Cheers,
Peter