[Gambas-user] detect the "MenuKey"

Gianluigi bagonergi at gmail.com
Sun Dec 20 10:59:20 CET 2020


Il giorno dom 20 dic 2020 alle ore 10:49 KKing <kicking177 at gmail.com> ha
scritto:

> 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.
>

it's a gtk bug just fixed in last master, use gb.gui.qt and everything will
work, even my code.

Gianluigi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20201220/d9b2e41c/attachment.htm>


More information about the User mailing list