Displaying styled text
ttasovac at Princeton.EDU
Thu Dec 5 08:48:01 EST 2002
thanks a lot for your suggestion. Setting the numbers to bold works
perfectly, but I'm still having problems with setting the bracketed text to
italics. The script below works correctly only if there is one occurrence
of a pair of brackets. If there are two, Revolution hangs up on me; and if
there are three or more occurrences, only the first two pairs are set to
italic + Rev hangs up.
> on mouseUp
> put 0 into skipChar
> put offset("(", fld "Data", skipChar) into startChar
> put offset(")", fld "Data", skipChar) into endChar
> if startChar = 0 or endChar = 0 then exit repeat
> set the textStyle of char startChar+skipChar to endChar+skipChar of
> fld "Data" to "italic"
> -- this includes the brackets
> put endChar into skipChar
> end repeat
I don't see what the problem is.
Any help will be greatly appreciated.
Department of Comparative Literature
318 East Pyne
Princeton, NJ 08544
ttasovac at princeton.edu
ttasovac at post.harvard.edu
More information about the Use-livecode