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 item's level number (indentation).
Get
VB.NET | Lvl = object.Level As Short |
VB | Lvl = object.Level As Integer |
C#.NET | short Lvl = object.Level; |
VC++ | short Lvl = object->Level; short Lvl = object->GetLevel(); |
C | HRESULT object->get_Level(short* Lvl); |
Put
VB.NET | object.Level = Lvl As Short |
VB | object.Level = Lvl As Integer |
C#.NET | short object.Level = Lvl; |
VC++ | short object->Level = Lvl; void object->PutLevel(short Lvl); |
C | HRESULT object->put_Level(short Lvl); |
object
Lvl
Defines the level (indentation) of the item described by object. Valid levels are between 0 and 255.
The Level property defines the item's level number (indentation).
When a level is assigned to an item, it is automatically indented and connected to a preceding item on a higher level. Connecting tree lines can be enabled using the Items.TreeLineStyle property.
The Level property determines the "indentation" of an item. By changing an item's level number, its parent relation is automatically adjusted by the control. Using this method, the application does not have to manipulate any parent/child relationships, but can instead treat the entire list of items as a linear list, an array of items.
The root (or highest) level is level 0, dependents are on levels 1, 2, 3 and lower.
C.Image.Height = 12 C.ImageHAlign = Align PropagateImage(ItemIndex, C.Image) End Sub Private Sub AddColor(ByVal Text As String, ByVal Clr As Color) Dim i As Integer i = AxSftBox1.Items.Add(Text) AxSftBox1.get_Item(i).Level = 2 UpdateColor(i, Clr, SftBoxHAlignConstants.halignSftBoxRight) End Sub Private Sub UpdateBuiltinImage(ByVal ItemIndex As Integer, ByVal Style As SftPictureImageConstants, ByVal wPix As Integer, ByVal hPix As Integer, ByVal Align As SftBoxHAlignConstants) Dim C As SftBoxCell C = AxSftBox1.get_Cell(ItemIndex, 0) C.Image.Appearance = Style
C.Image.Height = 12 C.ImageHAlign = Align PropagateImage ItemIndex, C.Image End Sub Private Sub AddColor(ByVal Text As String, ByVal Clr As OLE_COLOR) Dim I As Integer I = SftBox1.Items.Add(Text) SftBox1.Item(I).Level = 2 UpdateColor I, Clr, halignSftBoxRight End Sub Private Sub UpdateBuiltinImage(ByVal ItemIndex As Integer, ByVal Style As SftPictureImageConstants, ByVal wPix As Integer, ByVal hPix As Integer, ByVal Align As SftBoxHAlignConstants) Dim C As SftBoxCell Set C = SftBox1.Cell(ItemIndex, 0) C.Image.Appearance = Style
C.ImageHAlign = Align; PropagateImage(ItemIndex, C.Image); } private void AddColor(string Text, Color Clr) { int i; i = axSftBox1.Items.Add(Text); axSftBox1.get_Item(i).Level = 2; UpdateColor(i, Clr, SftBoxHAlignConstants.halignSftBoxRight); } private void UpdateBuiltinImage(int ItemIndex, SftPictureImageConstants Style, int wPix, int hPix, SftBoxHAlignConstants Align) { SftBoxCell C = axSftBox1.get_Cell(ItemIndex, 0); C.Image.Appearance = Style;
long ItemIndex = m_vBox->Items->Add("Supported Picture Types"); m_vBox->Cell[ItemIndex][1]->Text = _T("SftBox/OCX supports numerous image types, such as GDI+ images, bitmaps, icons, ImageLists and also offers numerous built-in images."); // add GDI+ samples ItemIndex = m_vBox->Items->Add(_T("GDI+ Images")); m_vBox->Item[ItemIndex]->Level = 1; m_vBox->Cell[ItemIndex][1]->Text = _T("All GDI+ images are supported, like GIF, JPEG, Exif, PNG, TIFF and device-independent bitmaps (up to 64bpp) with semi-transparent and translucent areas."); long i = m_vBox->Items->Add(_T("PNG Sample with alpha-channel for translucent edges")); m_vBox->Item[i]->Level = 2; UpdateImage(i, IDR_PNG_WARNING, halignSftBoxRight); i = m_vBox->Items->Add(_T("Another PNG Sample with alpha-channel for translucent edges")); m_vBox->Item[i]->Level = 2;
See Also SftBoxItem Object | Object Hierarchy