2.3.1.18 GETN_COMBO


Name

GETN_COMBO

Declaration

#define GETN_COMBO(_NODE_NAME, _NODE_LABEL, _DEFAULT_VAL, _COMBO_STR) _tmpSubNode = _tmpNode.AddNumericNode((double)_DEFAULT_VAL, #_NODE_NAME, TRGP_NUMERIC_LIST); TREE_ADD_LABEL(_NODE_LABEL);_tmpSubNode.SetAttribute(STR_COMBO_ATTRIB, _COMBO_STR);

Remark

This macro creates a combo control containing numeric values in the GetN_Box dialogbox.

Parameters

_NODE_NAME
[input] the name of the new node to be added to the tree
_NODE_LABEL
[input] the string value to show the combo name in the dialogbox
_DEFAULT_VAL
[input] double contents as the default value to show in the combo box
_COMBO_STR
[input] string type, should be a numeric values list separated with "|". For example, "2|3|4|5|6". Add "|" at the beginning, combo control will be editable.

Return

Examples

EX1

#include <GetNBox.h>
void GETN_COMBO_ex1()
{
    GETN_BOX( treeTest );
    GETN_COMBO(order, "Polynomial Order", 2, "2|3|4|5|6") // dropdown list, only allow to choose one from list
    GETN_COMBO(type, "Type", 1, "|0|1|2") // editable dropdown list, can type any numeric value to it
 
    if( GetNBox( treeTest )) // to open getn dialog
        out_tree( treeTest );
}

See Also

GETN_STRLIST

Header to Include

GetNbox.h

Reference