the texstyle of the clickline

Frank D. Engel, Jr. fde101 at fjrhome.net
Wed Sep 8 16:27:09 EDT 2004


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, doupsy at wanadoo.fr 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
>> use-revolution at lists.runrev.com
>> http://lists.runrev.com/mailman/listinfo/use-revolution
>>
>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> http://lists.runrev.com/mailman/listinfo/use-revolution
>
>
-----------------------------------------------------------
Frank D. Engel, Jr.  <fde101 at fjrhome.net>



___________________________________________________________
$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



More information about the use-livecode mailing list