hiliting a word

Frank D. Engel, Jr. fde101 at fjrhome.net
Thu Mar 3 09:59:17 EST 2005


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Try setting the autoHilite of the field to false then using this:

on mouseUp
   select the clickChunk
   put the selectedText into gSomeVariable
end mouseUp

On Mar 3, 2005, at 2:29 AM, Signe.Sanne at roman.uib.no wrote:

> Quoting Nicolas Cueto <nicolas_cueto at yahoo.com>:
>
>> Hello All,
>>
>> I'm after a hilited text effect. Namely, when a user clicks on a word
>> displayed in locked text field, that one word:
>>
>> 1) becomes hilited, i.e., it changes color
>>
>> 2) becomes placed into a variable
>>
>> My scription "solution" is this:
>>
>> on mouseUp
>>  put the clickChunk into tPos
>>  set the textColor of char (word 2 of tPos) to (word 4 of tPos) of 
>> field
>> "fText" to red
>>  put char (word 2 of tPos) to (word 4 of tPos) of field "fText" into
>> gSomeVariable
>> end mouseUp
>
> Try:
> on mouseUp
>   put the clickChunk into tPos
>   put the textColor of char (word 2 of tPos) to (word 4 of tPos) of me 
> into
> tOriginalColor
>   set the textColor of char (word 2 of tPos) to (word 4 of tPos) of me 
> to red
>   put char (word 2 of tPos) to (word 4 of tPos) of field 1 into 
> gSomeVariable
>   wait 30 ticks
>   set the textColor of char 1 to -1 of me to tOriginalColor
> end mouseUp
>
> Signe Marie Sanne
> _______________________________________________
> 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>

$ ln -s /usr/share/kjvbible /usr/manual
$ true | cat /usr/manual | grep "John 3:16"
John 3:16 For God so loved the world, that he gave his only begotten 
Son, that whosoever believeth in him should not perish, but have 
everlasting life.
$
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (Darwin)

iD8DBQFCJyZF7aqtWrR9cZoRApzhAJ9Jc+pjROyJtm+BWoDl6GE3f4uxgACfYluh
VklRVp6tzYgApJK6jFh7l9M=
=CCPP
-----END PGP SIGNATURE-----



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