2.3.1.13 GETN_BUTTON_GROUP
Name
GETN_BUTTON_GROUP
Declaration
#define GETN_BUTTON_GROUP(_NODE_NAME, _NODE_LABEL, _DEFAULT_VAL, _COMBO_STR) _tmpSubNode = _tmpNode.AddNumericNode((int)_DEFAULT_VAL, #_NODE_NAME, ONODETYPE_PUSHBUTTON_GROUP); TREE_ADD_LABEL(_NODE_LABEL);_tmpSubNode.SetAttribute(STR_COMBO_ATTRIB, _COMBO_STR);
Remark
Creates a group of push buttons. The labels are obtained from _COMBO_STR. The values of a node are numeric, reprsenting zero-offset index of the clicked button.
Parameters
- _NODE_NAME
- [input] the name of the new node to be added to the tree
- _NODE_LABEL
- [input] the string value to show as the node name in the dialogbox
- _DEFAULT_VAL
- [input] numeric offset of the selected button
- _COMBO_STR
- [input] the display text on each button
Return
Examples
EX1
#include <GetNbox.h>
void GETN_BUTTON_GROUP_ex1()
{
GETN_BOX( treeTest )
GETN_STR(path, "Path", "")
GETN_BUTTON_GROUP(Button, "Button", 2, "Open...|Save...") GETN_OPTION_EVENT_EX(test_button_event)
GETN_OPTION_DISPLAY_FORMAT(DISPLAY_EDITOR_RIGHT)
if( GetNBox( treeTest, "Title Open", "Open File" ))
out_tree( treeTest );
}
bool test_button_event(TreeNode& trGUI, int nRow, int nCol, TreeNode& trNode, DWORD dwCntrl, int nType, WndContainer& theDlg)
{
if(ONODETYPE_PUSHBUTTON_GROUP != nType && nRow < 0)
return false;
string strPath = GetOpenBox();
trGUI.path.strVal = strPath;
return true;
}
See Also
GETN_BUTTON
Header to Include
GetNbox.h
Reference
|