Hide

SftTree/DLL 7.5 - Tree Control

Display
Print

OpenEnded

Defines whether the last column is open-ended.

C

BOOL WINAPI SftTree_GetOpenEnded(HWND hwndCtl);
void WINAPI SftTree_SetOpenEnded(HWND hwndCtl, BOOL fSet);
BOOL WINAPI SftTreeSplit_GetOpenEnded(HWND hwndCtl, BOOL fLeft);
void WINAPI SftTreeSplit_SetOpenEnded(HWND hwndCtl, BOOL fSet, BOOL fLeft);

C++

BOOL CSftTree::GetOpenEnded() const;
void CSftTree::SetOpenEnded(BOOL fSet = TRUE);
BOOL CSftTreeSplit::GetOpenEnded(BOOL fLeft = TRUE) const;
void CSftTreeSplit::SetOpenEnded(BOOL fSet = TRUE, BOOL fLeft = FALSE);

Parameters

hwndCtl

The window handle of the tree control.

fSet

Set to TRUE to define the last column as open-ended. Set to FALSE to use the column width defined in the last column's SFTTREE_COLUMN_EX structure.

fLeft

Set to TRUE to return or set a value defining the last column on the left side of a split tree control (the portion of the tree control containing the hierarchy) as open-ended. If FALSE is specified, the open-ended status of the last column on the right side is returned or set.

Returns

GetOpenEnded returns TRUE if the last column is open-ended, otherwise FALSE is returned.

Comments

The GetOpenEnded and SetOpenEnded functions define whether the last column is open-ended.

An open-ended last column always uses at least the defined column width or the space remaining between the previous column and the right edge of the control. A fixed-width last column is defined with a specified width and any data which doesn't fit is truncated.

Examples

C

        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;
            memset(&CtrlInfo, 0, sizeof(SFTTREE_CONTROL));
            CtrlInfo.cbSize = sizeof(SFTTREE_CONTROL);

C++

    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;
        memset(&CtrlInfo, 0, sizeof(SFTTREE_CONTROL));
        CtrlInfo.cbSize = sizeof(SFTTREE_CONTROL);

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