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
This sample illustrates cell fonts.
The source code is located at C:\Program Files (x86)\Softelvdm\SftTree OCX 7.5\Samples\Visual Studio - VB.NET\ListFont\Form1.vb or C:\Program Files\Softelvdm\SftTree OCX 7.5\Samples\Visual Studio - VB.NET\ListFont\Form1.vb (on 32-bit Windows versions).
Private Sub closeButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles closeButton.Click Application.Exit() End Sub Private Sub AxSftTree1_ItemDblClick(ByVal sender As Object, ByVal e As AxSftTreeLib75._DSftTreeEvents_ItemDblClickEvent) Handles AxSftTree1.ItemDblClick If e.areaType = SftTreeAreaTypeConstants.constSftTreeColumnRes Then AxSftTree1.get_Column(e.colIndex).MakeOptimal() AxSftTree1.Items.RecalcHorizontalExtent() End If End Sub Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load AxSftTree1.BulkUpdate = True ' Add all screen fonts to the tree control Dim ScreenIndex As Integer ScreenIndex = AxSftTree1.Items.Add("Fonts") AxSftTree1.get_Item(ScreenIndex).Level = 0 ' display fonts Dim Counter As Integer = 0 Dim ff As FontFamily For Each ff In System.Drawing.FontFamily.Families ' add font name Dim newFont As Font Try newFont = New Font(ff.Name, 8) Catch newFont = Nothing End Try If Not newFont Is Nothing Then Counter = Counter + 1 If Counter > 50 Then ' only add up to 50 Exit For End If Dim ItemIndex As Integer ItemIndex = AxSftTree1.Items.Add(ff.Name) AxSftTree1.get_Item(ItemIndex).Level = 1 ' set the font AxSftTree1.get_Cell(ItemIndex, 0).Font = OLECvt.ToIFontDisp(newFont) ' set the font name in column 1 AxSftTree1.get_Cell(ItemIndex, 1).Text = ff.Name End If Next AxSftTree1.BulkUpdate = False ' make column widths optimal AxSftTree1.ColumnsObj.MakeOptimal() ' allow horizontal scrolling AxSftTree1.Items.RecalcHorizontalExtent() End Sub End Class