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 whether the item is enabled.
Get
VB.NET | Boolean = object.Enabled As Boolean |
VB | Boolean = object.Enabled As Boolean |
C#.NET | bool Boolean = object.Enabled; |
VC++ | VARIANT_BOOL Boolean = object->Enabled; VARIANT_BOOL Boolean = object->GetEnabled(); |
C | HRESULT object->get_Enabled(VARIANT_BOOL* Boolean); |
Put
VB.NET | object.Enabled = Boolean As Boolean |
VB | object.Enabled = Boolean As Boolean |
C#.NET | bool object.Enabled = Boolean; |
VC++ | VARIANT_BOOL object->Enabled = Boolean; void object->PutEnabled(VARIANT_BOOL Boolean); |
C | HRESULT object->put_Enabled(VARIANT_BOOL Boolean); |
object
A SftTreeItem object.
Boolean
Defines whether the item is enabled.
Boolean | Description |
---|---|
True | The item is enabled. |
False | The item is disabled. It is drawn in a "grayed" manner indicating its status. |
The Enabled property defines whether the item is enabled.
The DisabledItemsSelectable property can be used to prevent an end-user from selecting disabled items. Items can always be selected by an application. DisabledItemsSelectable only controls whether the end-user can select an item.
Private Sub AxSftTree1_VirtualItem(ByVal sender As Object, ByVal e As AxSftTreeLib75._DSftTreeEvents_VirtualItemEvent) Handles AxSftTree1.VirtualItem e.itemObject.Item.Cell(0).Text = "Item " & e.rowIndex e.itemObject.Item.Cell(1).Text = "Cell " & e.rowIndex e.itemObject.Item.Cell(2).Text = "A" e.itemObject.Item.Cell(3).Text = (e.rowIndex Mod 7) e.itemObject.Item.Cell(4).Text = "Last " & e.rowIndex e.itemObject.Item.RowHeader.Text = "R" & e.rowIndex e.itemObject.Item.Enabled = ((e.rowIndex Mod 2) = 0) If e.rowIndex Mod 17 = 0 Then e.itemObject.Item.RowHeader.Image.NETImageObject = imageListBitmaps.Images(e.rowIndex Mod 10) End If If e.rowIndex Mod 3 = 0 Then e.itemObject.Item.Cell(1).ForeColor = OLECvt.ToOleColor(System.Drawing.Color.Red) e.itemObject.Item.Cell(1).BackColor = OLECvt.ToOleColor(System.Drawing.Color.Aqua) End If
Private Sub SftTree1_VirtualItem(ByVal RowIndex As Long, ByVal ItemObject As VirtualItem) ItemObject.Item.Cell(0).Text = "Item " & RowIndex ItemObject.Item.Cell(1).Text = "Cell " & RowIndex ItemObject.Item.Cell(2).Text = "A" ItemObject.Item.Cell(3).Text = RowIndex Mod 7 ItemObject.Item.Cell(4).Text = "Last " & RowIndex ItemObject.Item.RowHeader.Text = "R" & RowIndex ItemObject.Item.Enabled = ((RowIndex Mod 2) = 0) If RowIndex Mod 17 = 0 Then ItemObject.Item.RowHeader.Image.Picture = Image1(RowIndex Mod 10).Picture End If If RowIndex Mod 3 = 0 Then ItemObject.Item.Cell(1).ForeColor = vbRed ItemObject.Item.Cell(1).BackColor = vbWhite End If
private void axSftTree1_VirtualItem(object sender, AxSftTreeLib75._DSftTreeEvents_VirtualItemEvent e) { e.itemObject.Item.get_Cell(0).Text = "Item " + e.rowIndex; e.itemObject.Item.get_Cell(1).Text = "Cell " + e.rowIndex.ToString(); e.itemObject.Item.get_Cell(2).Text = "A"; e.itemObject.Item.get_Cell(3).Text = (e.rowIndex % 7).ToString(); e.itemObject.Item.get_Cell(4).Text = "Last " + e.rowIndex.ToString(); e.itemObject.Item.RowHeader.Text = "R" + e.rowIndex.ToString(); e.itemObject.Item.Enabled = ((e.rowIndex % 2) == 0); if (e.rowIndex % 17 == 0) e.itemObject.Item.RowHeader.Image.NETImageObject = imageListBitmaps.Images[e.rowIndex % 10]; if (e.rowIndex % 3 == 0) { e.itemObject.Item.get_Cell(1).ForeColor = OLECvt.ToOleColor(System.Drawing.Color.Red); e.itemObject.Item.get_Cell(1).BackColor = OLECvt.ToOleColor(System.Drawing.Color.Aqua); }
pItemObj->Item->Cell[3]->Text = (LPCTSTR) str; str.Format(_T("Last %ld"), RowIndex); pItemObj->Item->Cell[4]->Text = (LPCTSTR) str; str.Format(_T("R%ld"), RowIndex); pItemObj->Item->RowHeader->Text = (LPCTSTR) str; pItemObj->Item->Enabled = ((RowIndex % 2) == 0) ? VARIANT_TRUE : VARIANT_FALSE; if (RowIndex % 17 == 0) pItemObj->Item->RowHeader->Image->SetImageListH((OLE_HANDLE)(HIMAGELIST)m_Bitmaps, (short)(RowIndex % 10)); if (RowIndex % 3 == 0) { pItemObj->Item->Cell[1]->ForeColor = RGB(255,0,0); pItemObj->Item->Cell[1]->BackColor = RGB(255,255,255); }
See Also SftTreeItem Object | Object Hierarchy