Fields - Full Justification
Jan Schenkel
janschenkel at yahoo.com
Mon Jun 4 06:16:26 EDT 2007
--- -= JB =- <sundown at nwrain.net> wrote:
> Revolution provides the ability to align text in
> fields
> Left-Center-Right.
>
> Is there a way to include Full Justification for
> text in
> a Revolution field.
>
> thanks,
> -=>JB<=-
>
Ji John,
Some people have hacked together full-justification by
inserting spaces at strategic spots in the text. So it
can be done, but it aint pretty.
Basically, you have to compare the 'formattedWidth'
property with the field width and its margins - to
figure out how many pixels you need.
Then add spaces between words until it fits - you
could set their 'textSize' to something small to
ensure they're only 1 pixel wide.
And you'll have to keep track of the non-justified
text if you want to change the content of your field.
In other words, it's better to wait until the RunRev
crew addresses this at the field control level in the
engine.
Best regards,
Jan Schenkel.
Quartam Reports for Revolution
<http://www.quartam.com>
=====
"As we grow older, we grow both wiser and more foolish at the same time." (La Rochefoucauld)
____________________________________________________________________________________
Sick sense of humor? Visit Yahoo! TV's
Comedy with an Edge to see what's on, when.
http://tv.yahoo.com/collections/222
More information about the use-livecode
mailing list