Recent

Author Topic: TMainMenu issue - gtk2?  (Read 1127 times)

GordonFindlay

  • Guest
TMainMenu issue - gtk2?
« on: May 15, 2024, 09:21:33 am »
I seem to recall an issue earlier with TMainmenu hotkeys and gtk2.  Is this perhaps a manifestation of it?

With a main menu on a form, I set the caption of one menu item as &Jump. In the menu editor the J is underlined - as expected.

But at run time, the J is not underlined, and  Alt-J does not trigger the Jump.

The TMainmenu.Shortcutkey property can be set to Alt+J - although that's not in the dropdown list associated with the property in the object inspector.
And it works. But extends the caption to be 'Jump   Alt+J'.

Is the &Jump hotkey construction supposed to work, in Lazarus 3.2, FPC 3.2.2  using gtk2 widget set, running on XFCE?

AlexTP

  • Hero Member
  • *****
  • Posts: 2480
    • UVviewsoft
Re: TMainMenu issue - gtk2?
« Reply #1 on: May 15, 2024, 10:10:29 am »
Alt+J will work for '&Jump' if '&Jump' is the root menu item, ie not the subitem.

GordonFindlay

  • Guest
Re: TMainMenu issue - gtk2?
« Reply #2 on: May 15, 2024, 10:14:38 am »
Oh.  I didn't see that documented anywhere, and I am using the shortcut for a submenu.

Bother.

petevick

  • Sr. Member
  • ****
  • Posts: 419
Re: TMainMenu issue - gtk2?
« Reply #3 on: May 15, 2024, 10:24:53 am »
the '&Jump' and Alt+J shortcut are two separate things. To see the '&Jump' underline at run time you have to hold down the Alt key which will show underlines at the top level, so say you have '&Edit' as a top menu, Alt+E will open that menu up, and all sub menu items will show underlines, but if '&Jump' is a sub menu item you'll just press J to activate. The Alt+J shortcut should work at anytime, although I've always used Ctrl+ for sub menu item shortcuts.
Pete Vickerstaff
Linux Mint 21.2 Cinnamon, Windows 10, Lazarus 3.2, FPC 3.2.2

teresa

  • Guest
Re: TMainMenu issue - gtk2?
« Reply #4 on: May 24, 2024, 03:56:27 am »
The Alt+J shortcut should work at anytime, although I've always used Ctrl+ for sub menu item shortcuts.
Maybe, but the Object Inspector drop-down doesn't include ALT-key in the list of possibilities for submenu items.

petevick

  • Sr. Member
  • ****
  • Posts: 419
Re: TMainMenu issue - gtk2?
« Reply #5 on: May 24, 2024, 07:42:49 am »
The Alt+J shortcut should work at anytime, although I've always used Ctrl+ for sub menu item shortcuts.
Maybe, but the Object Inspector drop-down doesn't include ALT-key in the list of possibilities for submenu items.
There are a lot of key combinations that are not in the drop down list, so either type Alt+J directly into the list field or click on the ... button to the right of the field and use the the displayed dialogue to choose.
Pete Vickerstaff
Linux Mint 21.2 Cinnamon, Windows 10, Lazarus 3.2, FPC 3.2.2

 

TinyPortal © 2005-2018