2.3.1.89 GETN_STRLIST


Name

GETN_STRLIST

Declaration

#define GETN_STRLIST(_NODE_NAME, _NODE_LABEL, _DEFAULT_VAL, _COMBO_STR)   _tmpSubNode = _tmpNode.AddTextNode(_DEFAULT_VAL, #_NODE_NAME, TRGP_STR);TREE_ADD_LABEL(_NODE_LABEL); _tmpSubNode.SetAttribute(STR_COMBO_ATTRIB, _COMBO_STR); GETN_OCNTRL_OPTION(OCNTRLPARAM1_NOT_LOCALIZED)

Remark

This macro creates a string combo list in the 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 string combo list's name in the dialogbox
_DEFAULT_VAL
[input] string contents as the default value to show in the combo option
_COMBO_STR
[input] string type, a string values list separated with "|". For example, "one|two|three|four|five". Add "|" at the beginning, list control will be editable.

Return

Examples

EX1

#include <GetNbox.h>
void GETN_STRLIST_ex1()
{
    GETN_BOX( treeTest )    
    
    // editable, choose one from list or directly type string into control
    GETN_STRLIST(WksName, "Worksheet Name", "one", "|one|two|three|four|five")
    
    // only can choose one from drop-down list
    GETN_STRLIST(datatype, "Data Type", "double", "int|short|double")
 
    if( GetNBox( treeTest ))
        out_tree( treeTest );
}

See Also

GETN_COMBO

Header to Include

GetNbox.h

Reference