2.3.1.5 GETN_ADD_LEFT_CHECK_TYPE


Name

GETN_ADD_LEFT_CHECK_TYPE

Declaration

#define GETN_ADD_LEFT_CHECK_TYPE(_TYPE)	_tmpSubNode.SetAttribute(STR_ATTRIB_DYNACONTROL_USE_CHECK_TYPE, _TYPE);

Remark

Options of the left checkbox.

Parameters

_TYPE
[input] it can be value DYNA_USE_CHECK_TYPE_SHOW or DYNA_USE_CHECK_TYPE_ENABLE.
DYNA_USE_CHECK_TYPE_SHOW : To determine the node is show or hide based on the checkbox.
DYNA_USE_CHECK_TYPE_ENABLE : To determine the node is enbale or disable based on the checkbox.

Return

Examples

EX1

void GETN_ADD_LEFT_CHECK_TYPE_Ex1()
{
    GETN_TREE(testTree)
 
    GETN_BEGIN_BRANCH(Fit, "Fitting Options")//Match GETN_END_BRANCH
        GETN_OPTION_BRANCH(GETNBRANCH_OPEN)
        GETN_NUM(Factor, "Scale Factor", 1.23)
        GETN_ADD_LEFT_CHECK(1)
        GETN_ADD_LEFT_CHECK_TYPE(DYNA_USE_CHECK_TYPE_SHOW)
    GETN_END_BRANCH(Fit)    //Match GETN_BEGIN_BRANCH

    if(GetNBox(testTree, NULL, NULL, NULL, NULL))
        out_tree(testTree);
}

EX2

void GETN_ADD_LEFT_CHECK_TYPE_Ex()
{
    GETN_TREE(testTree)
    
    GETN_STR_GROUP(ctrlh, "Uncheck to hide", "A", "|A|C|R|V|Y") 
		GETN_ADD_LEFT_CHECK(0)   
		//GETN_ADD_LEFT_CHECK_TYPE(DYNA_USE_CHECK_TYPE_SHOW)//by fefault
    GETN_NUM(ctrle, "Uncheck to disable", 1.23) 
		GETN_ADD_LEFT_CHECK(0)  
		GETN_ADD_LEFT_CHECK_TYPE(DYNA_USE_CHECK_TYPE_ENABLE)

    if( GetNBox(testTree, _on_change) )
    {
        if( tree_is_left_checkbox_checked(testTree.ctrlh) )
        {
        	printf("%s=%s\n", testTree.ctrlh.tagName, testTree.ctrlh.strVal);
        	
        	if( tree_is_left_checkbox_checked(testTree.ctrle) )
        		out_double(testTree.ctrle.tagName + "=", testTree.ctrle.dVal);
        }
        
    }
}

static int _on_change(TreeNode& tr, int nRow, int nEvent, DWORD& dwEnables, LPCSTR lpcszNodeName, WndContainer& getNContainer, string& strAux, string& strErrMsg)
{   
	tr.ctrle.Show = tree_is_left_checkbox_checked(tr.ctrlh);
	return true;
}

See Also

GETN_CONTROL_OPTION_BOX
GETN_ADD_LEFT_CHECK
tree_is_left_checkbox_checked
GETN_ADD_AUTO

Header to Included

GetNBox.h

Reference