Undos (vs. text alignment) [was: Script Editor]
Jim Ault
JimAultWins at yahoo.com
Sun May 25 14:01:36 EDT 2008
On 5/25/08 7:03 AM, "Richmond Mathewson" <geradamas at yahoo.com> wrote:
> If I use the following script:
>
> get the selectedText of fld "fTEXT"
> set the textColor of the selectedText to green
>
> it does what I expect it to (sets the textColor to the
> selected part of the text in fld "fTEXT" to green)
>
> BUT the following script:
>
> get the selectedText of fld "fTEXT"
> set the textAlign of the selectedText to right
>
> does NOT do what I expect it to (right-align the
> selected part of the text in fld "fTEXT")
>
> which is a bit of a b****r, and seems a bit
> inconsistent.
It is actually logical since buttons and fields are the only objects to
have a textAlign property, according to the docs.
Word processors extend this to paragraphs, but not to any selected text. So
technically, the word processor will set the alignment of the *paragraphs*
included in the selected text, not the text characters themselves.
Paragraphs can contain multiple lines.
Rev does not have paragraph objects.
Tables are another issue, eg. can a table cell contain a paragraph, or
multiple paragraphs, each with their own alignment properties?
Hope this helps.
Jim Ault
Las Vegas
More information about the use-livecode
mailing list