On 7/31/2015 5:52 PM, Brahmanathaswami wrote:
If we make a text selection and store it as a selectedChunk string

e.g

gCurrentSelection


which them would have say... a value of

char 669 to 1094 of field 6

How to I re-select that text?

global gCurrentSelection
on mouseUp
    set the backgroundcolor of gCurrentSelection to yellow
end mouseUp

works'

but

global gCurrentSelection
on mouseUp
   selectgCurrentSelection
end mouseUp

does not... an i can't find a way to re-set the selection ....

I like to avoid "do" because that requires an on-the-fly compilation, so I generally use this:

set the backgroundcolor of char (word 2 of gCurrentSelection) to (word 4 of gCurrentSelection) of fld "somefield" to "yellow"

Or if the field will vary:

set the backgroundcolor of char (word 2 of gCurrentSelection) to (word 4 of gCurrentSelection) of fld (last word of gCurrentSelection) to "yellow"

--
Jacqueline Landman Gay         |     jac...@hyperactivesw.com
HyperActive Software           |     http://www.hyperactivesw.com

_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to