[Gambas-bugtracker] Bug #2751: GTK3 shortcut or focus problem

bugtracker at gambaswiki.org bugtracker at gambaswiki.org
Wed Jun 14 00:37:31 CEST 2023


http://gambaswiki.org/bugtracker/edit?object=BUG.2751&from=L21haW4-

Comment #14 by Bruce STEERS:

i have a better/simpler fix/workaround.

Just remove the menu from the window on de-focus

I just add this to View_LostFocus() event

  If mnuPopup And If mnuPopup.Closed Then
    mnuPopup.Children.Clear
    mnuPopup = Null
  Endif

It works fine,

Other suggestion for a fix..
Just remove the key shortcuts from the menu items, then the individual editor Keypress event handles the shortcut key presses not the last created mnuPopup menu.
I tested this fix and it also works fine.

The key text for the shortcuts like "CTRL+C", etc could just be added as plain text easily enough as no localization would be required.

Respects




More information about the Bugtracker mailing list