Buttonclick deselects text

Mark Smith mark at maseurope.net
Sat Feb 10 21:14:43 EST 2007


Kresten, you put this in the card script:

local tSelText

on mouseEnter
   if "button" is in the target then put theSelectedText into tSelText
end mouseEnter

function getSelText
   return tSelText
end getSelText

and in the relevant button scripts:

on mouseUp
   doSomethingWith getSelText()
end mouseUp

Best,

Mark

On 11 Feb 2007, at 00:38, Kresten Bjerg wrote:

> Hi
> I have  buttons, which, on mouseup,  shall use bits of user- 
> selectedtext
> from a textfield. But it seems that the clicking of some  buttons
> deselects the text before it can be caught. I guess this is a trivial
> problem,but : what is the trick to postpone the deselection ?
> I shall be grateful for advice
> Kresten Bjerg
>
>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your  
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution




More information about the use-livecode mailing list