2.1.26.5 get_GetN_background_colors


Description

Get the GetN color string

Syntax

string get_GetN_background_colors( uint & nLeafFirstColor, uint & nLeafSecondColor, vector<uint> & vnBranchColors )

Parameters

nLeafFirstColor
[input]leaf row background alternate first color
nLeafSecondColor
[input]leaf row background alternate second color
vnBranchColors
[input] the vector of branch colors

Return

the color string.

Examples

EX1

#include <GetNBox.h>
void get_GetN_background_colors_ex1()
{
    GETN_TREE(trTemp)
    GETN_STR(str1, "string1", "string for test")
    GETN_STR(str12, "string12", "string for test")
    GETN_STR(str13, "string13", "string for test")
    GETN_STR(str14, "string14", "string for test")
    GETN_BEGIN_BRANCH(branch1, "Node1")
        GETN_BEGIN_BRANCH(branch2, "Node11")
            GETN_STR(str2, "string2", "")
            GETN_CHECK(check1, "checkbox1", 1)
            GETN_BEGIN_BRANCH(branch21, "Node21")
                GETN_STR(str2, "string2", "")
                GETN_CHECK(check1, "checkbox1", 1)
                GETN_BEGIN_BRANCH(branch211, "Node211")
                    GETN_STR(str2, "string2", "")
                    GETN_CHECK(check1, "checkbox1", 1)
                GETN_END_BRANCH(branch2)
            GETN_END_BRANCH(branch2)
        GETN_END_BRANCH(branch2)
        GETN_BEGIN_BRANCH(branch3, "Node12")
            GETN_STR(str2, "string3", "")
            GETN_CHECK(check1, "checkbox2", 1)
        GETN_END_BRANCH(branch3)
    GETN_END_BRANCH(branch1)
    
    uint nLeaf1= COLOR_WHITE;
    uint nLeaf2 = RGB(0xF0,0xF0,0xF0);
    uint nBranch1=COLOR_BLUE;
    uint nBranch2=COLOR_YELLOW;
    uint nBranch3=COLOR_RED;
    uint nBranch4=COLOR_ORANGE;
    vector<uint> vsBranchColors;
    vsBranchColors.Add(nBranch1);
    vsBranchColors.Add(nBranch2);
    vsBranchColors.Add(nBranch3);
    //vsBranchColors.Add(nBranch4);

    string strColors=get_GetN_background_colors(nLeaf1, nLeaf2, vsBranchColors);
    trTemp.SetAttribute(STR_ATTRIB_TREE_ROW_COLOR, strColors);
    GetNBox(trTemp);
}

Remark

See Also

Header to Include

origin.h

Reference