Hide

SftTree/DLL 7.5 - Tree Control

Display
Print

ShowTruncated

Defines whether text is clipped or truncated using trailing "...".

C

BOOL WINAPI SftTree_GetShowTruncated(HWND hwndCtl);
void WINAPI SftTree_SetShowTruncated(HWND hwndCtl, BOOL fSet);
BOOL WINAPI SftTreeSplit_GetShowTruncated(HWND hwndCtl);
void WINAPI SftTreeSplit_SetShowTruncated(HWND hwndCtl, BOOL fSet);

C++

BOOL CSftTree::GetShowTruncated() const;
void CSftTree::SetShowTruncated(BOOL fSet = TRUE);
BOOL CSftTreeSplit::GetShowTruncated() const;
void CSftTreeSplit::SetShowTruncated(BOOL fSet = TRUE);

Parameters

hwndCtl

The window handle of the tree control.

fSet

Set to TRUE to display truncated text using trailing "...", otherwise set to FALSE.

Returns

GetShowTruncated returns TRUE if text is clipped or truncated using trailing "...", otherwise FALSE is returned.

Comments

The GetShowTruncated and SetShowTruncated functions define whether text is clipped or truncated using trailing "...".

The display method defined using SetShowTruncated applies to all text components in a tree control. By setting it to TRUE, text that is too large (horizontally) to fit in the space allocated will be truncated by showing trailing periods ("..."). If set to FALSE, text will be clipped if too large and displayed in the available area.

Examples

C

        SftTree_SetShowButtons(g_hwndTree, TRUE);/* Expand/collapse buttons (level 1..n) */
        SftTree_SetShowButton0(g_hwndTree, TRUE);/* Show expand/collapse buttons (level 0) */
        if (SftTree_GetGDIPlusAvailable(g_hwndTree))
            SftTree_SetButtons(g_hwndTree, SFTTREE_BUTTON_USERDEF);/* User-defined buttons */
        else
            SftTree_SetButtons(g_hwndTree, SFTTREE_BUTTON_AUTOMATIC3);/* Automatic button style 3 */
        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 */

C++

    m_Tree.SetShowButtons(TRUE);         /* Expand/collapse buttons (level 1..n) */
    m_Tree.SetShowButton0(TRUE);         /* Show expand/collapse buttons (level 0) */
    if (m_Tree.GetGDIPlusAvailable())
        m_Tree.SetButtons(SFTTREE_BUTTON_USERDEF);/* User-defined buttons */
    else
        m_Tree.SetButtons(SFTTREE_BUTTON_AUTOMATIC3);/* Automatic button style 3 */
    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 */

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