My pop up menu deselects my text...

Martin Baxter martin at harbourtown.co.uk
Fri Feb 13 14:48:34 EST 2004


<"m" wrote:
>
>I am trying to create a context pop up menu that allows you to simply
>copy text.
>
>Problem:  the ìpopupî command works just fine, but as soon as my menu
>pops up, my selected text is deselected.
>
>I have a goofy work around right now where I just throw the selected
>text into a container and then change itís color (so you know what was
>highlighted) before popping up the context menu.
>
>But I need to be able to pop up the menu while keeping my text selected
>(like all word processors do).
>
>What am I missing?

If you are using the popup command on Windows, (or presumably,  any other
OS where buttons can get focus), you may need to set the traversalon of the
source popup menu button to false. It will grab the focus otherwise. This
property is true by default and I don't think it is exposed in the property
inspector for a popup menu button, so you may have to use the message box
like :

set the traversalon of btn "popupbtn" to false.

Hope this helps.

Martin




More information about the use-livecode mailing list