Motif Menubars - Motif

This is a discussion on Motif Menubars - Motif ; (I know I've posed various forms of this question here and elsewhere already but I'm getting desperate. I aplologize for the repetition.) Is there a right and wrong (or good and bad) way for creating XmMenuBars? I have specified XmNmnemonics ...

+ Reply to Thread
Results 1 to 3 of 3

Thread: Motif Menubars

  1. Motif Menubars


    (I know I've posed various forms of this question here and elsewhere already
    but I'm getting desperate. I aplologize for the repetition.)

    Is there a right and wrong (or good and bad) way for creating XmMenuBars? I
    have specified XmNmnemonics for all my menubar buttons. If a toplevel
    menubar item has the same mnemonic as an item on an opened submenu, pressing
    the submenu mnemonic can sometimes (not for all my menubars) open the
    toplevel menu item instead of selecting the submenu item from the opened
    menu.

    In other words:

    1) Alt-F opens the 'File' menu. It contains a submenu item 'Close' with a
    mnemmonc of 'C'.

    2) Alt-C opens the 'Calculate' menu.

    2) Pressing 'Alt-F' followed by 'C' should execute the 'Close' command from
    the opened 'File' menu. Instead, it opens the 'Calculate' menu.

    What could possibly explain this? Any pointers, suggestions, or anything
    whatsoever would be extremely helpful.

    BTW most of my XmMenuBars are created in UIL if that matters in anyway.
    Very few of my menus are actually coded using the API. Maybe there is a wrog
    way to do this in UIL and I'm missing something?

    --
    Jake Colman
    Sr. Applications Developer
    Principia Partners LLC
    Harborside Financial Center
    1001 Plaza Two
    Jersey City, NJ 07311
    (201) 209-2467
    www.principiapartners.com

  2. Re: Motif Menubars

    Did you mean accelerator instead of mnemonic? A mnemonic is simply a
    KeySym. For instance, in uil you might have:

    arguments {
    XmNmenonic = 84;
    XmNaccelerator = "Ctrlt:";
    XmNacceleratorText = "Ctrl+T";
    };

    Jake Colman wrote:
    > (I know I've posed various forms of this question here and elsewhere already
    > but I'm getting desperate. I aplologize for the repetition.)
    >
    > Is there a right and wrong (or good and bad) way for creating XmMenuBars? I
    > have specified XmNmnemonics for all my menubar buttons. If a toplevel
    > menubar item has the same mnemonic as an item on an opened submenu, pressing
    > the submenu mnemonic can sometimes (not for all my menubars) open the
    > toplevel menu item instead of selecting the submenu item from the opened
    > menu.
    >
    > In other words:
    >
    > 1) Alt-F opens the 'File' menu. It contains a submenu item 'Close' with a
    > mnemmonc of 'C'.
    >
    > 2) Alt-C opens the 'Calculate' menu.
    >
    > 2) Pressing 'Alt-F' followed by 'C' should execute the 'Close' command from
    > the opened 'File' menu. Instead, it opens the 'Calculate' menu.
    >
    > What could possibly explain this? Any pointers, suggestions, or anything
    > whatsoever would be extremely helpful.
    >
    > BTW most of my XmMenuBars are created in UIL if that matters in anyway.
    > Very few of my menus are actually coded using the API. Maybe there is a wrog
    > way to do this in UIL and I'm missing something?
    >



  3. Re: Motif Menubars

    >>>>> "CAR" == Craig A Roloff writes:

    CAR> Did you mean accelerator instead of mnemonic? A mnemonic is simply a
    CAR> KeySym. For instance, in uil you might have:

    CAR> arguments {
    CAR> XmNmenonic = 84;
    CAR> XmNaccelerator = "Ctrlt:";
    CAR> XmNacceleratorText = "Ctrl+T";
    CAR> };

    I did mean XmNmnemonic. The argument specifies the menu letter that is to be
    underlined and used as a short-cut for the menu item.

    Apparently, there may be a known problem with UIL-based menubars. I've
    converted one of my windows to use a code-based menubar and that problem
    seems to be resolved.

    Anyone know anything more about this?

    --
    Jake Colman
    Sr. Applications Developer
    Principia Partners LLC
    Harborside Financial Center
    1001 Plaza Two
    Jersey City, NJ 07311
    (201) 209-2467
    www.principiapartners.com

+ Reply to Thread