popup of menu (functionality not correct implemented...)

Ton Kuypers tkuypers at pandora.be
Tue Nov 1 18:53:41 EST 2005


Martin,

Interesting approach...
I will see if it is working in my app, thanks for the effort!

regards,

Ton Kuypers


On 1-nov-05, at 22:23, Martin Baxter wrote:

> Ton,
>
> Although you have given up, you might want to consider this, which  
> seems to work in a simple test stack.
>
> The flimsy part of this is that you need to know the height of a  
> menuitem in your popup, and I don't know a way to get this  
> programmatically. I did a screenshot and measured it at 17 pixels  
> on XP here.
>
> The offset of the popup topleft sets the last selection under the  
> mouse when the menu pops up, and I find that highlights it.
>
> --card script
> on mousedown
>   put max(field "num",1) into tn
>   popup btn "testpop" at mouseh()-8,(mousev()-8-((tn-1)*17))
> end mousedown
>
> --script of popup button "testpop"
> on menupick
>   put the menuhistory of me into field "num"
> end menupick
>
> ## My test stack has a field "num" which holds the
> ## last menuhistory of btn "testpop"
> ## just for testing purposes of course
>
> Martin Baxter
>




More information about the use-livecode mailing list