GETN_BUTTON_BRANCH

 

Name

GETN_BUTTON_BRANCH

Declaration

#define     GETN_BUTTON_BRANCH              _tmpNode.SetAttribute(STR_ATTRIB_BRANCH_COMBO, "...");_tmpNode.Use=1;

Remark

Add a button to a branch.

Examples

EX1

#include <GetNbox.h>
void GETN_BUTTON_BRANCH_ex1()
{
    GETN_TREE(tr)

    GETN_BEGIN_BRANCH(WhichDay, "Test Branch with Combo") GETN_BUTTON_BRANCH
        GETN_LIST(Smooth, "Smoothing Method", 0, "Adj Ave|Savisky-Golay|FFT Filter")
        GETN_COMBO(npts, "Smooth Pts",1, "|1|2|3|4|5|6")
    GETN_END_BRANCH(WhichDay)    //Match GETN_BEGIN_BRANCH

    if(GetNBox(tr, NULL, NULL, NULL, CheckChange))
    {
        out_int("Test Combo = ", tr.WhichDay.Use);
    }
}
bool CheckChange(TreeNode& myTree, int nRow, int nType, Dialog& dlgGetNbox)
{
    if(nRow < 0)// On dialog init, nothing to do
        return false;
   
    if(nType != TRGP_BRANCH)
    {
        return false;
    }
   
    if(TRGP_BRANCH == nType)
    {
        out_str("branch button clicked.");
    }
    return true;
}

See Also

header to Include

GetNbox.h

Reference