[Gambas-user] detect the "MenuKey"
KKing
kicking177 at gmail.com
Sun Dec 20 10:48:55 CET 2020
so in my stripped back example one form with two textboxes ... and a
menu this
> If Key.Code = Key["m"] And If Key.Control Then
> Me.PopupMenu = "Menu1"
> Menu1.Popup(Me.X + (Me.W \ 2), Me.Y + (Me.H \ 2))
> Endif
Did not work, but this
> If Key.Code = Key["Menu"] Then
> Me.PopupMenu = "Menu1"
> Menu1.Popup(Me.X + (Me.W \ 2), Me.Y + (Me.H \ 2))
> Endif
this does work nicely, so thank you all for the snippets to test and use.
For some reason on a much more cluttered main form even the Public Sub
Form_KeyPress() and Public Sub Form_KeyRelease() just don't seem to be
being triggered at all. Need to try and debug / break it down to find
out why.
More information about the User
mailing list