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
Returns the item's number of all dependents.
Get
| VB.NET | Count = object.DependentAllCount As Integer |
| VB | Count = object.DependentAllCount As Long |
| C#.NET | int Count = object.DependentAllCount; |
| VC++ | long Count = object->DependentAllCount; long Count = object->GetDependentAllCount(); |
| C | HRESULT object->get_DependentAllCount(long* Count); |
object
A SftTreeItem object.
Count
Returns the item's number of all dependents, including immediate and indirect dependents.
The DependentAllCount property returns the item's number of all dependents.
The Item.DependentCount property can be used to determine the item's number of immediate dependents.
' item picture
Dim img As SftPictureObject
If AxSftTree1.get_Item(curr).Image.Type = SftPictureTypeConstants.sftTypeIDispatch Then
img = AxSftTree1.get_Item(curr).Image
Else
If AxSftTree1.get_Item(curr).Expanded Then
img = AxSftTree1.Items.ItemImageExpanded
ElseIf AxSftTree1.get_Item(curr).DependentAllCount > 0 Then
img = AxSftTree1.Items.ItemImageExpandable
Else
img = AxSftTree1.Items.ItemImageLeaf
End If
End If
Dim sendingImage As Image = OLECvt.ToImage(img.Picture)
Data.SetData(DataFormats.Bitmap, True, sendingImage)
DoDragDrop(Data, DragDropEffects.Copy)
' cell text
Data.SetData SftTree1.Cell(curr, 0).Text, vbCFText
' item picture
If SftTree1.Item(curr).Image.Type = sftTypeIDispatch Then
Data.SetData SftTree1.Item(curr).Image.Picture, vbCFDIB
Else
If SftTree1.Item(curr).Expanded Then
Data.SetData SftTree1.Items.ItemImageExpanded.Picture, vbCFDIB
ElseIf SftTree1.Item(curr).DependentAllCount > 0 Then
Data.SetData SftTree1.Items.ItemImageExpandable.Picture, vbCFDIB
Else
Data.SetData SftTree1.Items.ItemImageLeaf.Picture, vbCFDIB
End If
End If
End Sub
// item picture
SftPictureObject img = null;
if (axSftTree1.get_Item(curr).Image.Type == SftPictureTypeConstants.sftTypeIDispatch) {
img = axSftTree1.get_Item(curr).Image;
} else {
if (axSftTree1.get_Item(curr).Expanded)
img = axSftTree1.Items.ItemImageExpanded;
else if (axSftTree1.get_Item(curr).DependentAllCount > 0)
img = axSftTree1.Items.ItemImageExpandable;
else
img = axSftTree1.Items.ItemImageLeaf;
}
Image sendingImage = OLECvt.ToImage(img.Picture);
data.SetData(DataFormats.Bitmap, true, sendingImage);
DoDragDrop(data, DragDropEffects.Copy);
}
// cell text
pDataObject->SetData(_variant_t(m_vTree->Cell[curr][0]->Text), _variant_t((short)sftCFText));
// item picture
if (m_vTree->Item[curr]->Image->Type == sftTypeIDispatch) {
pDataObject->SetData(_variant_t(m_vTree->Item[curr]->Image->GetPicture(), _variant_t((short)sftCFDIB)));
} else {
if (m_vTree->Item[curr]->Expanded != VARIANT_FALSE)
pDataObject->SetData(_variant_t(m_vTree->Items->ItemImageExpanded->GetPicture(), _variant_t((short)sftCFDIB)));
else if (m_vTree->Item[curr]->DependentAllCount > 0)
pDataObject->SetData(_variant_t(m_vTree->Items->ItemImageExpandable->GetPicture(), _variant_t((short)sftCFDIB)));
else
pDataObject->SetData(_variant_t(m_vTree->Items->ItemImageLeaf->GetPicture(), _variant_t((short)sftCFDIB)));
}
}
void CDragDropDlg::OnOLEDragDropSftTree(LPDISPATCH FAR* Data, long FAR* Effect, short FAR* Button, short FAR* Shift, float FAR* x, float FAR* y)See Also SftTreeItem Object | Object Hierarchy
