Or maybe this:
if the textStyle of the clickline is empty then set the textStyle of the clickline to bold
else if "bold" is among the items of the textStyle of the clickline then
put the textStyle of the clickline into x
delete item itemOffset("bold", x) of x
set the textStyle of the clickline to x
else set the textStyle of the clickline to (the textStyle of the clickline) & ",bold"
This way, any other styles are not modified by the code. Of course, this only matters if there might be other styles.
In the other case, you might consider this:
if the textStyle of the clickline is bold then set the textStyle of the clickline to plain
else set the textStyle of the clickline to bold
On Sep 8, 2004, at 3:49 PM, Bj�rnke von Gierke wrote:
maybe this is what you need?
if the textstyle of the clickline contains "bold" is false then set the textstyle of the clickline to "bold" else set the textstyle of the clickline to "plain" end if
On Sep 08 2004, at 18:56, [EMAIL PROTECTED] wrote:
Hello,
I have a card with a locked field and many lines of text inside. The script of this field is :
on mouseup
if the textstyle of the clickline is "plain" then set the textstyle of the clickline to "bold" else set the textstyle of the clickline to "plain"
end mouseup
I used this script under Hypertalk with no problem.
Under Revolution, this script don't work correctly.
When the textstyle is "plain", I saw than sometimes the textstyle of the clickline can be "plain" and sometimes can be empty.
With others textstyles (bold, italic, underline, etc...) there is no problem.
I rectified this script like this :
on mouseup
if (the textstyle of the clickline is "plain" or the textstyle of the clickline is empty) then ......
end mouseup
Is there a better solution ?
Thanks
Leo
_______________________________________________ use-revolution mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/use-revolution
_______________________________________________ use-revolution mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/use-revolution
----------------------------------------------------------- Frank D. Engel, Jr. <[EMAIL PROTECTED]>
___________________________________________________________ $0 Web Hosting with up to 120MB web space, 1000 MB Transfer 10 Personalized POP and Web E-mail Accounts, and much more. Signup at www.doteasy.com
_______________________________________________ use-revolution mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/use-revolution
