Hide

SftTree/DLL 7.5 - Tree Control

Display
Print

RowColHeaderStyle

Defines the position of the text displayed in the row/column header.

C

DWORD WINAPI SftTree_GetRowColHeaderStyle(HWND hwndCtl);
void WINAPI SftTree_SetRowColHeaderStyle(HWND hwndCtl, DWORD style);
DWORD WINAPI SftTreeSplit_GetRowColHeaderStyle(HWND hwndCtl);
void WINAPI SftTreeSplit_SetRowColHeaderStyle(HWND hwndCtl, DWORD style);

C++

DWORD CSftTree::GetRowColHeaderStyle() const;
void CSftTree::SetRowColHeaderStyle(DWORD style);
DWORD CSftTreeSplit::GetRowColHeaderStyle() const;
void CSftTreeSplit::SetRowColHeaderStyle(DWORD style);

Parameters

hwndCtl

The window handle of the tree control.

style

The style used for the row/column header.

One value of each of the following tables can be combined and passed as style parameter.

styleHorizontal row/column header text alignment
not specifiedIf no horizontal row/column header text alignment is specified, the default is ES_LEFT.
ES_LEFTThe row/column header text is left aligned within the row/column header.
ES_CENTERThe row/column header text is centered within the row/column header.
ES_RIGHTThe row/column header text is right aligned within the row/column header.
styleVertical row/column header text alignment
not specifiedIf no vertical row/column header text alignment is specified, the default is SFTTREE_VCENTER.
SFTTREE_TOPThe row/column header text and picture are aligned with the top of the row/column header.
SFTTREE_VCENTERThe row/column header text and picture are vertically centered within the row/column header.
SFTTREE_BOTTOMThe row/column header text and picture are aligned with the bottom of the row/column header.

The style value can optionally be combined with one or more of the following values:

SFTTREE_HEADER_DISABLEDThe row/column header is disabled, cannot be clicked and is displayed in a "grayed" fashion.
SFTTREE_HEADER_UPThe row/column header buttons will automatically return to its "up" position when clicked.

Returns

GetRowColHeaderStyle returns a value indicating the position of the text displayed in the row/column header.

Comments

The GetRowColHeaderStyle and SetRowColHeaderStyle functions define the position of the text displayed in the row/column header.

The row/column header text can be defined using SetRowColHeaderText.

The row/column header area is only shown if row headers and column headers are both shown (see SetShowRowHeader and SetShowHeader).

Examples

C

            // RowInfo.index = index;
            // SftTree_GetRowInfo(g_hwndTree, &RowInfo);
            // /* m_hRowBitmap = LoadBitmap(app_instance, MAKEINTRESOURCE(IDB_your_bitmap)); *//* Row header picture */
            // Sft_SetPictureBitmap(&RowInfo.Row.RowPicture1, m_hRowBitmap);
            // RowInfo.Row.flag = SFTTREE_BMP_RIGHT;
            // SftTree_SetRowInfo(g_hwndTree, &RowInfo);
        }
        SftTree_SetRowColHeaderText(g_hwndTree, TEXT(""));/* Row/column header text */
        SftTree_SetRowColHeaderStyle(g_hwndTree, ES_LEFT | SFTTREE_HEADER_UP);/* Row/column header style */
        Sft_InitPicture(&Pic);
        Sft_SetPictureSizeOnly(&Pic, PIC_SIZEX, PIC_SIZEY);/* Row/column header picture */
        SftTree_SetRowColHeaderPicture(g_hwndTree, &Pic);/* Row/column picture */
        SftTree_SetRowColHeaderPictureStyle(g_hwndTree, SFTTREE_BMP_RIGHT);/* Row/column picture alignment */
        SftTree_SetCharSearchMode(g_hwndTree, SFTTREE_CHARSEARCH_ALLCHARS, -1);/* Consider all characters typed */
        /* Change the default colors */
        {

C++

        // RowInfo.index = index;
        // m_Tree.GetRowInfo(&RowInfo);
        // /* m_RowBitmap.LoadBitmap(IDB_your_bitmap); *//* Row header picture */
        // Sft_SetPictureBitmap(&RowInfo.Row.RowPicture1, m_RowBitmap);
        // RowInfo.Row.flag = SFTTREE_BMP_RIGHT;
        // m_Tree.SetRowInfo(&RowInfo);
    }
    m_Tree.SetRowColHeaderText(_T("?"));       /* Row/column header text */
    m_Tree.SetRowColHeaderStyle(ES_LEFT | SFTTREE_HEADER_UP);/* Row/column header style */
    Sft_InitPicture(&Pic);               /* Initialize */
    Sft_SetPictureSizeOnly(&Pic, PIC_SIZEX, PIC_SIZEY);/* Row/column header picture */
    m_Tree.SetRowColHeaderPicture(&Pic);       /* Row/column picture */
    m_Tree.SetRowColHeaderPictureStyle(SFTTREE_BMP_RIGHT);/* Row/column picture alignment */
    m_Tree.SetCharSearchMode(SFTTREE_CHARSEARCH_ALLCHARS, -1);/* Consider all characters typed */
    /* Change the default colors */
    {

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