Names of option push buttons in resource file? - Motif

This is a discussion on Names of option push buttons in resource file? - Motif ; I have searched the FAQS and groups and cannot find an answer to this question: Is there a way to specify the name of the push buttons from a XmVaCreateSimpleOption menu in a resource file? Currently I have something like ...

+ Reply to Thread
Results 1 to 3 of 3

Thread: Names of option push buttons in resource file?

  1. Names of option push buttons in resource file?

    I have searched the FAQS and groups and cannot find an answer to this
    question:

    Is there a way to specify the name of the push buttons from a
    XmVaCreateSimpleOption menu in a resource file? Currently I have
    something like this:

    /* Define XmStrings str1, str2, etc.... */

    optionMenu = XmVaCreateSimpleOptionMenu(rc1, (char *)"optionMenu",
    NULL, NULL, 0, optionMenuCb,
    XmVaPUSHBUTTON, str1, NULL, NULL, NULL,
    XmVaPUSHBUTTON, str2, NULL, NULL, NULL,
    NULL);

    I want to specify str1 and str2 in the resource file instead of in the
    code. I know that these buttons are named button_0, button_1, etc. and
    I have tried several different permutations in the resource file like:

    *.optionMenu.button_0.labelString: "Some Text"

    but nothing has worked. The Motif book gives this info:

    The user can specify resources in a resource file for the automatically
    created widgets and gadgets of an OptionMenu. The following list
    identifies the names of these widgets (or gadgets) and the associated
    OptionMenu areas.

    Option Menu Label Gadget--"OptionLabel"

    Option Menu Cascade Button--"OptionButton"


    but I am not quite sure what it means.

    Any help would be greatly appreciated!


  2. Re: Names of option push buttons in resource file?

    Kevin wrote:
    > *.optionMenu.button_0.labelString: "Some Text"


    Not an expert on this, but just a tought: if "optionMenu" is some
    composite object, perhaps the button_0 isn't a son of optionMenu but
    rather the son of a son of optionMenu.

    Have you tried *button_0.labelString: "Some Text" to see if that might
    pick it up ? If so, it might be indicative that you need something
    between optionMenu and button_0

    (Just a wild guess on my part).

  3. Re: Names of option push buttons in resource file?

    "Kevin" wrote in news:1107541974.732556.108570
    @o13g2000cwo.googlegroups.com:
    > optionMenu = XmVaCreateSimpleOptionMenu(rc1, (char *)"optionMenu",
    > NULL, NULL, 0, optionMenuCb,
    > XmVaPUSHBUTTON, str1, NULL, NULL, NULL,
    > XmVaPUSHBUTTON, str2, NULL, NULL, NULL,
    > NULL);
    >
    > I want to specify str1 and str2 in the resource file instead of in the
    > code.


    You may need to use the normal menu functions (not "Simple") to set strings via
    resource. The simple menu functions are intended only for the simplest menus.

    Ken Lee, http://www.rahul.net/kenton/

+ Reply to Thread