2.3.1.83 GETN_SYMBOL


Name

GETN_SYMBOL

Declaration

#define GETN_SYMBOL(_NODE_NAME, _NODE_LABEL, _DEFAULT_VAL)  _tmpSubNode = _tmpNode.AddNumericNode((int)_DEFAULT_VAL, #_NODE_NAME, TRGP_SYMBOL);TREE_ADD_LABEL(_NODE_LABEL);

Remark

This macro creates a symbol list control on a tree generated by GETN_TREE.

Parameters

_NODE_NAME
[input] the name of the symbol list to be added to the tree
_NODE_LABEL
[input] the string value to show the symbol list in the dialogbox
_DEFAULT_VAL
[input] index of the default selected item in the combolist

Return

Examples

EX1

#include <GetNBox.h>

void GETN_SYMBOL_ex1()
{
    //make sure a graphlayer is active with at least one DataPlot on it
    GraphLayer gl = Project.ActiveLayer();
    if( gl )
    {
        DataPlot dp = gl.DataPlots();
        if( dp )
        {
            GETN_TREE(testTree) // 1st declare a tree
            GETN_SYMBOL(Symbol, "Symbol", 0);  //default select solid square symbol
            testTree.Symbol.nVal = dp.GetSymbol(); //get last used symbol
            if( GetNBox(testTree, "Set Symbol", "Select a Symbol:") ) //will show a GETN_BOX for user to choose plot symbol
            {
                dp.SetSymbol(testTree.Symbol.nVal); //update plot symbol
                dp.Invalidate();  //redraw
            }
        }
    }
}

See Also

Header to Include

GetNbox.h

Reference