2.3.1.69 GETN_RADIO_INDEX_EX


Name

GETN_RADIO_INDEX_EX

Declaration

#define GETN_RADIO_INDEX_EX(_NODE_NAME, _NODE_LABEL, _DEFAULT_VAL, _COMBO_STR)		GETN_RADIO_INDEX(_NODE_NAME, _DEFAULT_VAL, _COMBO_STR)		TREE_ADD_LABEL(_NODE_LABEL);

Remark

Creates a group of radios. The labels are obtained from _COMBO_STR. The values of a node are numeric, reprsenting zero-offset index of the selected radio.

Parameters

_NODE_NAME
[input] the name of the new node to be added to the tree
_NODE_LABEL
[input] the label of control
_DEFAULT_VAL
[input] the default choice
_COMBO_STR
[input] the string list, "one|two|three|four|five" will show a list of radio buttons with text one, two, three, four, five.

Return

Examples

EX1

#include <GetNBox.h>
void GETN_RADIO_INDEX_EX_ex1()
{
    GETN_BOX(trInfo)
    GETN_CHECK(citizen, "US Citizen", 0)    
    GETN_RADIO_INDEX_EX(genderChoice, "Gender", 0, "Male|Female|Other")
            GETN_OPTION_DISPLAY_FORMAT(DISPLAY_EDITOR_LEFT)
    

    if( GetNBox(trInfo, "Your Info") )
    {
        out_tree(trInfo);

        int citizen = trInfo.citizen.nVal;
        int gender = trInfo.genderChoice.nVal;
        printf("Citizen: %d\nGender: %d\n", citizen, gender);
    }
}

See Also

GETN_RADIO_INDEX

Header to Include

GetNbox.h

Reference