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 default font used to display cell text.
Get
Put
PutRef
object
refFontObj
Defines the default font used to display cell text. For information about font properties, please visit the applicable section "Using SftTree/OCX with ...".
The Font property defines the default font used to display cell text.
The Font property defines the default font used for all cells. The height for items is calculated based on the Font and Items.Lines properties so that cell text is never clipped vertically, unless multi-line text is used with more lines than defined using the Items.Lines property.
The Cell.Font property can be used to override an individual cell's font. The Footers.Font, Headers.Font and RowHeaders.Font properties are used to define the fonts used to display the column footers, column headers and row headers.
AxSftTree1.Headers.SortIndicators = SftTreeHeaderSortIndicatorsConstants.headerSortIndicatorsSftTreeAuto AxSftTree1.get_Header(0).SortIndicator = SftTreeSortIndicatorConstants.sortIndicatorSftTreeAscending Dim R As Random R = New Random() ' set the cell font for books Dim fnt As Font fnt = New Font(AxSftTree1.Font, FontStyle.Bold) Dim pFont As stdole.IFontDisp pFont = OLECvt.ToIFontDisp(fnt) Dim bk As Integer For bk = 1 To 4 ' add a book Dim bookIndex As Integer
// set the column header sort indicators axSftTree1.Headers.SortIndicators = SftTreeHeaderSortIndicatorsConstants.headerSortIndicatorsSftTreeAuto; axSftTree1.get_Header(0).SortIndicator = SftTreeSortIndicatorConstants.sortIndicatorSftTreeAscending; Random random = new Random(); // set the cell font for books Font fnt = new Font(axSftTree1.Font, FontStyle.Bold); stdole.IFontDisp pFont = OLECvt.ToIFontDisp(fnt); for (int bk = 1 ; bk <= 4 ; ++bk) { // add a book int bookIndex = axSftTree1.Items.Add("Book " + bk.ToString()); axSftTree1.get_Cell(bookIndex, 1).Text = "Description for book " + bk.ToString(); int size = random.Next(1, bk == 1 ? 99 : 999);
m_vTree->Items->ItemImageLeaf->PutBitmapHandle((OLE_HANDLE)(HBITMAP)m_Topic); // set the column header sort indicators m_vTree->Headers->SortIndicators = headerSortIndicatorsSftTreeAuto; m_vTree->Header[0]->SortIndicator = sortIndicatorSftTreeAscending; // make a copy of the tree control's font and make a bold // font for certain cells IFontPtr pFont = m_vTree->GetFont(); IFontPtr pCellFont; HRESULT hr = pFont->Clone(&pCellFont); ASSERT(SUCCEEDED(hr)); pCellFont->put_Bold(TRUE); // Add all available options for (int bk = 1 ; bk <= 4 ; ++bk) {
See Also SftTree Object | Object Hierarchy