GETN_BUTTON
#define GETN_BUTTON(_NODE_NAME, _NODE_LABEL, _DEFAULT_VAL) _tmpSubNode = _tmpNode.AddTextNode(_DEFAULT_VAL, #_NODE_NAME, TRGP_STR_BUTTON); TREE_ADD_LABEL(_NODE_LABEL);_tmpSubNode.SetAttribute(STR_COMBO_ATTRIB, "...");
This macro creates a button in a string edit box in GetN_Box dialog.
EX1
#include <GetNbox.h> void GETN_BUTTON_ex1() { GETN_TREE(testTree) GETN_NUM(Factor, "Scale Factor", 12.3) GETN_BUTTON(Path, "File path", GetAppPath()) GETN_OPTION_EVENT(button_event) if(GetNBox(testTree, NULL, NULL, NULL, NULL)) out_tree(testTree); } bool button_event(TreeNode& myTree, int nRow, int nType, Dialog& theDlg) { if(TRGP_STR_BUTTON == nType && nRow >= 0) { string strPath = BrowseGetPath(myTree.Path.strVal); myTree.Path.strVal = strPath; return true; } else return false; }
GETN_BUTTON_BRANCH
GetNbox.h