Removing text styles
Jan Schenkel
janschenkel at yahoo.com
Fri Jun 6 03:28:00 EDT 2003
--- Jim Hurley <jhurley at infostations.com> wrote:
> When I run the following handler, the style of the
> text is not plain.
> It retains the text shift.
>
> on mouseUp
>
> put "Now is the time." into field 1
> set the textshift of char 3 in field 1 to 3
> set the textstyle of char 1 to -1 of field 1 to
> "plain"
>
> end mouseUp
>
> However, if I select the text and, from the Text
> Menu, select "Plain
> Text", the style does indeed revert to Plain text.
>
> I would have expected the menu action to be the same
> as the command
> line in the handler.
>
> How would one remove the textshift of a field
> programmatically?
>
> Jim
>
Hi Jim,
Try this :
set the textStyle of char 1 to -1 of field \
"Foobar" to empty -- not "plain"
Hope this helped,
Jan Schenkel.
=====
"As we grow older, we grow both wiser and more foolish at the same time." (La Rochefoucauld)
__________________________________
Do you Yahoo!?
Yahoo! Calendar - Free online calendar with sync to Outlook(TM).
http://calendar.yahoo.com
More information about the use-livecode
mailing list