Disabling keyboard shortcuts for popup menus :: WDSibyl :: Visual Development Environment
Benutzer registrieren

Disabling keyboard shortcuts for popup menus  Unten

  • Hi All

    In my code I disable some popup menu items under certain conditions.

    However, I am finding that this does not disable the keyboard shortcut associated with that popup menu item.

    I have a menu with AddLineMenuItem (menu shows Add Line and keyboard shortcut Alt+A).
    When I use AddLineMenuItem.Enabled := False in my code the menu item (Add Line) and the keyboard shortcut (Alt+A) are grayed out and cannot be selected by mouse. Shame the keyboard shortcut (Alt+A) still works...

    What am I doing wrong? - or, How do I work around this?

    Regards

    Pete
  • Hello!

    That sound like a bug of the wdsibyl-source.

    Workaround:
    On the onitem-function check with a "if"-Statement is the menuitem enable or disable. When it is disable then exit the function.

    regards
    Wolfgang
  • Hi Wolfgang

    DOH! Of course!

    What a simple workaround - and it works :-)

    Thanks

    Pete
  • 0 Benutzer

Diese Angaben basieren auf den Useraktivitäten der letzten 30 Minuten.