[Gambas-user] popup Menu question
ron
ronstk at ...239...
Wed May 24 03:38:29 CEST 2006
Hello
I have implemented a drag and drop function.
At the moment of drop I need an answer on a popup menu.
So I made a menu of 2 choises and use .pop
PUBLIC SUB grdDrop2()
DIM hMenu AS Menu
IF NOT hMenus THEN hMenus = NEW Menu(ME)
ME.hMenus.Children.Clear
hmenu = NEW menu(hMenus) AS "grdAction2"
hmenu.Caption = "Move"
hmenu.tag = FALSE
hmenu = NEW menu(hMenus) AS "grdAction2"
hmenu.Caption = "Swap"
hmenu.tag = TRUE
hmenus.Popup
END
PUBLIC SUB grdAction2_Click()
bMove = LAST.tag
END
in the drop sub
if drag.source=a then
...
endif
if drag.source=b then
grdDrop2
if bMove then
'do move
else
'do swap
endif
endif
Now I found when I use move several times it moves
When I use then swap it does move and on repeat the swap again
it does the swap.
The chosen menu entry is delayed 1 drop/click, it's not direct
used but the next time I do the drop.
Using
..move1,swap2,move3,swap4,swap5,swap6 does
..swap0,move1,swap2,move3,swap4,swap5
Ron
More information about the User
mailing list