is_treenode_optional

 

Description

Returns whether the node is optional.

Syntax

BOOL is_treenode_optional( TreeNode & tr )

Parameters

tr
[input] The tree node of GetN control

Return

TRUE if the node is disable by the left checkbox or its value is <optional>, otherwise FALSE

Examples

EX1

#include <GetNbox.h>    
void is_treenode_optional_ex()
{
    GETN_TREE( tr );
    GETN_STR(STR, "Tips", STR_OPTIONAL) GETN_CONTROL_OPTION_BOX(true)
    
    if( GetNBox( tr ))
    {
        out_tree( tr );
        
        bool bOptional = is_treenode_optional(tr.STR);
        printf("Node %s optional\n", bOptional? "is" : "isn't");        
    }
}

Remark

See Also

GETN_CONTROL_OPTION_BOX

header to Included

origin.h

Reference