Hide

SftTree/DLL 7.5 - Tree Control

Display
Print

CalcVisibleOnly

Defines whether only visible items are considered for optimal column width and scrolling calculation.

C

BOOL WINAPI SftTree_GetCalcVisibleOnly(HWND hwndCtl);
void WINAPI SftTree_SetCalcVisibleOnly(HWND hwndCtl, BOOL fSet);
BOOL WINAPI SftTreeSplit_GetCalcVisibleOnly(HWND hwndCtl);
void WINAPI SftTreeSplit_SetCalcVisibleOnly(HWND hwndCtl, BOOL fSet);

C++

BOOL CSftTree::GetCalcVisibleOnly() const;
void CSftTree::SetCalcVisibleOnly(BOOL fSet = TRUE);
BOOL CSftTreeSplit::GetCalcVisibleOnly() const;
void CSftTreeSplit::SetCalcVisibleOnly(BOOL fSet = TRUE);

Parameters

hwndCtl

The window handle of the tree control.

fSet

Specify TRUE to limit the width calculation to visible items only. Items which are not visible because their parent items are collapsed are not included in the width calculation.

Returns

GetCalcVisibleOnly returns TRUE if only visible items are considered, FALSE otherwise.

Comments

The GetCalcVisibleOnly and SetCalcVisibleOnly functions define whether only visible items are considered for optimal column width and scrolling calculation.

This function is used to define whether only visible items should be considered when using SftTree_CalcOptimalColumnWidth, SftTree_CalcOptimalRowHeaderWidth, SftTree_MakeColumnOptimal, SftTree_MakeRowHeaderOptimal and SftTree_RecalcHorizontalExtent. The C implementation of these functions does not support the fSet parameter. SetCalcVisibleOnly is not normally used with C++ as the equivalent C++ functions support this as a parameter.

Examples

C

            SftTreeSplit_SetRowInfo(g_hwndTree, &RowInfo);
        }
        SftTreeSplit_SetRowColHeaderText(g_hwndTree, TEXT("?"));/* Row/column header text */
        SftTreeSplit_SetRowColHeaderStyle(g_hwndTree, ES_LEFT | SFTTREE_HEADER_UP);/* Row/column header style */
        Sft_InitPicture(&m_RowColHeaderPicture);
        Sft_SetPictureBitmap(&m_RowColHeaderPicture, LoadBitmap(g_hInst, MAKEINTRESOURCE(IDB_SMILE1)));/* Row/column header picture */
        SftTreeSplit_SetRowColHeaderPicture(g_hwndTree, &m_RowColHeaderPicture);/* Row/column picture */
        SftTreeSplit_SetRowColHeaderPictureStyle(g_hwndTree, SFTTREE_BMP_RIGHT);/* Row/column picture alignment */
        SftTreeSplit_SetCalcVisibleOnly(g_hwndTree, TRUE);/* Visible items only (for calculations) */
        SftTreeSplit_SetCharSearchMode(g_hwndTree, SFTTREE_CHARSEARCH_NONE, -1);/* Ignore typed characters */
        /* Use a ToolTips callback routine */
        {
            SFTTREE_TOOLTIPSPARM Parm;       /* Parameter list */
            Parm.lpfnToolTips = (SFTTREE_TOOLTIPSPROC) Tree_ToolTipsCallback;/* User supplied routine */
            Parm.UserData = (SFTTREE_DWORD_PTR)0;/* User supplied data */
            SftTreeSplit_SetToolTipsCallback(g_hwndTree, &Parm);

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