Q's about menu's

Hello Rooters,

This is with root 5.27.06 on Windows7.

  1. First, is it possible to have a high-level menu entry with no popup menu? That is, selecting the menu entry would cause that entry’s selection, and not display some list of menu items.

  2. Can function keys F1-F12 be used as hotkeys?

The following questions are about tutorials/gui/guitest behaviour:

  1. Selecting a main-menu entry with a hotkey keypress seems to work only the first time correctly. After working once, it now takes two keypresses of a hot-key to cause top-level menu items to display their popup menus. After i start guitest.c, I press alt-f to bring up the file menu, press escape to close the menu, it now takes two alt-f keypresses to bring up the menu. (same thing for other menus).

  2. Can’t select a popup menu’s item with a hotkey. Run guitest, press alt-F to open file menu, now press alt-x to exit program but the menu does not respond. None of the file popup menu’s hotkeys work. Press alt-O to select the file open item, but instead the ‘Open Editor’ command buttons responds.

thanks very much,
buddy

Hi buddy,

  1. no
  2. no, only regular characters (this is more or less a standard behaviour) but you can still handle F1…F12 keys in your application, see for example RootShower::HandleKey(Event_t *event) in
    $ROOTSYS/test/RootShower/RootShower.cxx
  3. I cannot reproduce the problem…
  4. You must type ‘Alt-F’, then ‘x’ only (and not ‘Alt-x’)

Cheers, Bertrand.

Thank you Bertrand.

buddy