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 a simple combo box with fonts, bitmaps.
The source code is located at C:\Program Files (x86)\Softelvdm\SftBox OCX 5.0\Samples\Visual Studio - VB.NET\Features\Form1.vb or C:\Program Files\Softelvdm\SftBox OCX 5.0\Samples\Visual Studio - VB.NET\Features\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 Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load BoldFont = New Font(SftBox1.Font, FontStyle.Bold) ItalicFont = New Font("Arial", 8, FontStyle.Italic) Dim index As Integer SftBox1.BulkUpdate = True For index = 0 To 29 If index = 4 Then AddOneItem("Item " & index, "This cell text is very long", "Cell " & index & ",2") ElseIf index = 7 Then AddOneItem("Item " & index, "Cell " & index & ",1", "This cell text is also very long") Else AddOneItem("Item " & index, "Cell " & index & ",1", "Cell " & index & ",2") End If Next SftBox1.BulkUpdate = False SftBox1.get_Column(0).Width = SftBox1.Width / 4 SftBox1.get_Column(1).Width = SftBox1.Width / 4 SftBox1.RowHeaders.MakeOptimal(0) SftBox1.get_Column(2).MakeOptimal(0) SftBox1.Items.RecalcHorizontalExtent(0) End Sub Private Function AddOneItem(ByVal Cell0 As String, ByVal Cell1 As String, ByVal Cell2 As String) As Integer Dim index As Integer index = SftBox1.Items.Add(Cell0) SftBox1.get_Cell(index, 1).Text = Cell1 If index Mod 4 = 0 Then SftBox1.get_Cell(index, 1).Image.NETImageObject = pictureSpecial.Image If index Mod 8 = 0 Then SftBox1.get_Cell(index, 1).ImageHAlign = SftBoxHAlignConstants.halignSftBoxRight End If SftBox1.get_Cell(index, 2).Text = Cell2 If index Mod 5 = 0 Then SftBox1.get_Cell(index, 2).Image.NETImageObject = picturePin.Image If index Mod 10 = 0 Then SftBox1.get_Cell(index, 2).ImageHAlign = SftBoxHAlignConstants.halignSftBoxRight End If If index Mod 3 = 0 Then SftBox1.get_Item(index).RowHeader.Image.NETImageObject = picturePic.Image If index Mod 6 = 0 Then SftBox1.get_Item(index).RowHeader.ImageHAlign = SftBoxHAlignConstants.halignSftBoxRight End If If index Mod 6 = 0 Then SftBox1.get_Cell(index, 0).Font = OLECvt.ToIFontDisp(BoldFont) If index Mod 7 = 0 Then SftBox1.get_Cell(index, 1).Font = OLECvt.ToIFontDisp(ItalicFont) AddOneItem = index End Function