Hide

SftTree/DLL 7.5 - Tree Control

Display
Print

InheritBgColor

Defines whether the area to the left of the first cell inherits the cell's background color.

C

BOOL WINAPI SftTree_GetInheritBgColor(HWND hwndCtl);
void WINAPI SftTree_SetInheritBgColor(HWND hwndCtl, BOOL fSet);
BOOL WINAPI SftTreeSplit_GetInheritBgColor(HWND hwndCtl);
void WINAPI SftTreeSplit_SetInheritBgColor(HWND hwndCtl, BOOL fSet);

C++

BOOL GetInheritBgColor() const;
void SetInheritBgColor(BOOL fSet = TRUE);
BOOL GetInheritBgColor() const;
void SetInheritBgColor(BOOL fSet = TRUE);

Parameters

hwndCtl

The window handle of the tree control.

fSet

Set to TRUE to inherit the background color, otherwise set to FALSE.

Returns

GetInheritBgColor returns a value indicating whether the background color is inherited. TRUE is returned if the column or cell background color is inherited, otherwise FALSE.

Comments

The GetInheritBgColor and SetInheritBgColor functions define whether the area to the left of the first cell inherits the cell's background color.

If FALSE is specified, the area to the left of the first cell uses the foreground and background colors defined using SetCtlColors (SFTTREE_COLORS, colorFg and colorBg, colorSelFg and colorSelBg). Otherwise, the column or cell specific colors of the first displayed column are used. Column colors are defined using SetColumns (SFTTREE_COLUMN_EX, colorFg and colorBg, colorFgSel and colorBgSel). Cell colors are defined using SetCellInfo (SFTTREE_CELL, colorFg and colorBg, colorFgSel and colorBgSel).

Examples

C

        SftTree_SetShowGrid(g_hwndTree, TRUE);/* Show grid */
        SftTree_SetGridStyle(g_hwndTree, SFTTREE_GRID_BOTH_DOT);/* Dotted grid lines */
        SftTree_SetShowTruncated(g_hwndTree, TRUE);/* Show ... if truncated */
        SftTree_SetSelectionStyle(g_hwndTree, SFTTREE_SELECTION_ALL | SFTTREE_SELECTION_OUTLINE);/* Select entire item using outline */
        SftTree_SetSelectionArea(g_hwndTree, SFTTREE_SELECTIONAREA_ALLCELLS);/* Selection changes by clicking on an item's cells */
        SftTree_SetFlyby(g_hwndTree, TRUE);  /* Flyby highlighting */
        SftTree_SetUpdateCaretExpandCollapse(g_hwndTree, FALSE);/* don't update caret location when expand/collapse button clicked */
        SftTree_SetScrollTips(g_hwndTree, TRUE);/* Show Scrolltips */
        SftTree_SetInheritBgColor(g_hwndTree, TRUE);/* Inherit background color of first cell */
        SftTree_SetReorderColumns(g_hwndTree, TRUE);/* Column reordering */
        SftTree_SetOpenEnded(g_hwndTree, FALSE);/* Last column width */
        SftTree_SetShowHeaderButtons(g_hwndTree, TRUE);/* Show column header as buttons */

        /* Define control attributes */
        {
            SFTTREE_CONTROL CtrlInfo;

C++

    m_Tree.SetShowGrid(TRUE);            /* Show grid */
    m_Tree.SetGridStyle(SFTTREE_GRID_BOTH_DOT);/* Dotted grid lines */
    m_Tree.SetShowTruncated(TRUE);       /* Show ... if truncated */
    m_Tree.SetSelectionStyle(SFTTREE_SELECTION_ALL | SFTTREE_SELECTION_OUTLINE);/* Select entire item using outline */
    m_Tree.SetSelectionArea(SFTTREE_SELECTIONAREA_ALLCELLS);/* Selection changes by clicking on an item's cells */
    m_Tree.SetFlyby(TRUE);               /* Flyby highlighting */
    m_Tree.SetUpdateCaretExpandCollapse(FALSE);/* don't update caret location when expand/collapse button clicked */
    m_Tree.SetScrollTips(TRUE);          /* Show Scrolltips */
    m_Tree.SetInheritBgColor(TRUE);      /* Inherit background color of first cell */
    m_Tree.SetReorderColumns(TRUE);      /* Column reordering */
    m_Tree.SetOpenEnded(FALSE);          /* Last column width */
    m_Tree.SetShowHeaderButtons(TRUE);   /* Show column header as buttons */

    /* Define control attributes */
    {
        SFTTREE_CONTROL CtrlInfo;

See Also C/C++ API | Categories | Notifications