[Laszlo-user] Letter spacing, Paragraph spacing
Benjamin Shine
ben at laszlosystems.com
Thu Jun 29 01:55:03 EDT 2006
Easy answer:
Put each block of text in its own text view, inside a container that
has a simplelayout and spacing="10". That will put each paragraph 10
pixels below the bottom of the previous one.
Nasty answer:
If you want leading within a paragraph, you can set it, but in a non-
portable way that will probably cause my fellow developers to throw
useless promotional demo-ware cd roms at me for even mentioning this
technique.
The mechanism that will currently allow you to specify leading is
flash-specific, and not officially supported in the OpenLaszlo
platform. It probably won't be available in DHTML in early versions
of the Legals (multiple runtimes) release.
The basic thing you do is, reach into the text view, get the
__LZtextclip, which is the actual flash action script movie clip, and
which YOU'RE NOT SUPPOSED TO KNOW ABOUT. Then you call some methods
on that instance of the text clip, probably something like
var flashformat = new TextFormat();
this.__LZtextclip.setNewTextFormat(flashformat);
See http://elfurl.com/5gvea
aka http://www.adobe.com/support/flash/action_scripts/
actionscript_dictionary/actionscript_dictionary788.html
for documentation of text clip. Actually, it looks like you can set
leading but not kerning -- this is a limitation of Flash, not of Open
Laszlo.
The source distribution uses this technique in lps/components/
extensions/views/richinputtext.*
-benjamin
On Jun 28, 2006, at 9:43 PM, Ricardo Martins wrote:
> Hi,
>
> Is there a way to specify the spacing of two adjacent letters and
> paragraphs ?
>
> Regards,
> Ricardo Martins
>
> _______________________________________________
> 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