SftTree/DLL 7.5 - Tree Control
SftBox/OCX 5.0 - Combo Box Control
SftButton/OCX 3.0 - Button Control
SftMask/OCX 7.0 - Masked Edit Control
SftTabs/OCX 6.5 - Tab Control (VB6 only)
SftTree/OCX 7.5 - Tree Control
SftPrintPreview/DLL 2.0 - Print Preview Control (discontinued)
SftTree/DLL 7.5 - Tree Control
SftBox/OCX 5.0 - Combo Box Control
SftButton/OCX 3.0 - Button Control
SftDirectory 3.5 - File/Folder Control (discontinued)
SftMask/OCX 7.0 - Masked Edit Control
SftOptions 1.0 - Registry/INI Control (discontinued)
SftPrintPreview/OCX 1.0 - Print Preview Control (discontinued)
SftTabs/OCX 6.5 - Tab Control (VB6 only)
SftTree/OCX 7.5 - Tree Control
SftTabs/NET 6.0 - Tab Control (discontinued)
SftTree/NET 2.0 - Tree Control
Defines the row header display style.
C
int WINAPI SftTree_GetShowRowHeader(HWND hwndCtl); void WINAPI SftTree_SetShowRowHeader(HWND hwndCtl, int style); int WINAPI SftTreeSplit_GetShowRowHeader(HWND hwndCtl); void WINAPI SftTreeSplit_SetShowRowHeader(HWND hwndCtl, int style);
C++
int CSftTree::GetShowRowHeader() const; void CSftTree::SetShowRowHeader(int style); int CSftTreeSplit::GetShowRowHeader() const; void CSftTreeSplit::SetShowRowHeader(int style);
hwndCtl
The window handle of the tree control.
style
A value describing the row header display style:
SFTTREE_ROWSTYLE_NONE | No row headers. |
SFTTREE_ROWSTYLE_BUTTONTEXT | Displays row headers as buttons. No default text. |
SFTTREE_ROWSTYLE_TITLETEXT | Displays row headers as titles. No default text. |
SFTTREE_ROWSTYLE_BUTTONCOUNT0 | Displays row headers as buttons. The row header text defaults to the zero-based index of the item and can be specified using SetRowText. |
SFTTREE_ROWSTYLE_TITLECOUNT0 | Displays row headers as titles. The row header text defaults to the zero-based index of the item and can be specified using SetRowText. |
SFTTREE_ROWSTYLE_BUTTONCOUNT1 | Displays row headers as buttons. The row header text defaults to the one-based index of the item and can be specified using SetRowText. |
SFTTREE_ROWSTYLE_TITLECOUNT1 | Displays row headers as buttons. The row header text defaults to the one-based index of the item and can be specified using SetRowText. |
GetShowRowHeader returns a value describing the current row header style.
The GetShowRowHeader and SetShowRowHeader functions define the row header display style.
If the current style is set to SFTTREE_ROWSTYLE_BUTTONTEXT, SFTTREE_ROWSTYLE_BUTTONCOUNT0 or SFTTREE_ROWSTYLE_BUTTONCOUNT1, the row headers are displayed as buttons, which can be clicked by the user. Row header buttons reflect the selection status (See GetSel and GetCurSel) of each item.
The value defined using SetShowRowHeader applies to all row headers and cannot be changed for individual items.
The status of the row header buttons can be controlled using SetRowHeaderStyle.
LPSFTTREE_COLUMN_EX lpCol; int nCols; nCols = SftTree_GetColumnsEx(g_hwndTree, &lpCol);/* Get column attributes */ Sft_SetPictureSizeOnly(&lpCol[0].Picture1, PIC_SIZEX, PIC_SIZEY);/* Set column header picture size */ Sft_SetPictureSizeOnly(&lpCol[1].Picture1, PIC_SIZEX, PIC_SIZEY);/* Set column header picture size */ SftTree_SetColumnsEx(g_hwndTree, nCols, lpCol);/* Set new column attributes */ } SftTree_SetShowRowHeader(g_hwndTree, SFTTREE_ROWSTYLE_BUTTONCOUNT1);/* Row style */ /* Register the row header picture size. All row header */ /* pictures used must be the same size. Only one picture */ /* needs to be registered, even if several are used. */ { SFTTREE_ROWINFOPARM RowInfo; RowInfo.version = 7; RowInfo.index = -1;
LPSFTTREE_COLUMN_EX lpCol; int nCols; nCols = m_Tree.GetColumns(&lpCol);/* Get column attributes */ Sft_SetPictureSizeOnly(&lpCol[0].Picture1, PIC_SIZEX, PIC_SIZEY);/* Set column header picture size */ Sft_SetPictureSizeOnly(&lpCol[1].Picture1, PIC_SIZEX, PIC_SIZEY);/* Set column header picture size */ m_Tree.SetColumns(nCols, lpCol); /* Set new column attributes */ } m_Tree.SetShowRowHeader(SFTTREE_ROWSTYLE_BUTTONCOUNT1);/* Row style */ /* Register the row header picture size. All row header */ /* pictures used must be the same size. Only one picture */ /* needs to be registered, even if several are used. */ { SFTTREE_ROWINFOPARM RowInfo; RowInfo.version = 7; RowInfo.index = -1;
See Also C/C++ API | Categories | Notifications