how to set the textStyle of word 1 of the selection?

BNig niggemann at uni-wh.de
Wed Mar 17 08:36:38 EDT 2010


Jaque,
I like your solution a lot. I modified it a bit in case a word is not fully
selected in the first place. It would only set the textstyle to the selected
part of the word.
-------------------------
on mouseUp
   select word 1 of the selection
   if the number of words in the selection = 0 then exit mouseUp
   put word -1 of the selectedChunk into tFieldNbr
   put the number of words of char 1 to (word 2 of the selectedChunk) of
field tFieldNbr into tWordNbr
   select word tWordNbr of field tFieldNbr
   set the textstyle of the selectedChunk to "link"
end mouseup
-------------------------
This way a user will have the textstyle of the word changed even if he did
not include the last letter or two in the selection. Selecting text with a
mouse can easily be one off for a lot of users.
regards
Bernd
-- 
View this message in context: http://n4.nabble.com/how-to-set-the-textStyle-of-word-1-of-the-selection-tp1593292p1596331.html
Sent from the Revolution - User mailing list archive at Nabble.com.



More information about the use-livecode mailing list