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 cell's application specific numeric value.
Get
VB.NET | Number = object.Data As Integer |
VB | Number = object.Data As Long |
C#.NET | int Number = object.Data; |
VC++ | long Number = object->Data; long Number = object->GetData(); |
C | HRESULT object->get_Data(long* Number); |
Put
VB.NET | object.Data = Number As Integer |
VB | object.Data = Number As Long |
C#.NET | int object.Data = Number; |
VC++ | long object->Data = Number; void object->PutData(long Number); |
C | HRESULT object->put_Data(long Number); |
object
A SftTreeCell object.
Number
Defines the cell's application specific numeric value.
The Data property defines the cell's application specific numeric value.
The Data property can be used to store application specific data with a cell. Possible uses include storing pointers to data structures or values used for sorting purposes (see Items.SortDependents method).
The Cell.DataString, Cell.DataObject, Cell.DataTag properties can be used to store additional application specific data, using other data types (strings, objects, variants).
Additional properties used to associate an application defined value with an item are Item.Data, Item.DataTag, Item.DataObject, Item.DataFloat and Item.DataString. These are distinct properties and can be used at the same time.
End Sub
Private Function AddFolder(ByVal Folder As String, ByVal Desc As String, ByVal Count As Integer) As Integer
Dim ItemIndex As Integer
ItemIndex = AxSftTree1.Items.Add(Folder) ' add folder
AxSftTree1.get_Cell(ItemIndex, 1).Text = Desc ' add description
AxSftTree1.get_Cell(ItemIndex, 3).Text = Count.ToString() ' add number of messages
AxSftTree1.get_Cell(ItemIndex, 3).Data = Count ' also save number of messages for sorting
' make the folder name bold
If m_BoldFont Is Nothing Then
m_BoldFont = AxSftTree1.get_Cell(ItemIndex, 0).Font
m_BoldFont.Bold = True
End If
AxSftTree1.get_Cell(ItemIndex, 0).Font = m_BoldFont
Dim DeletedFolder As Long
Private Function AddFolder(ByVal Folder As String, ByVal Desc As String, ByVal Count As Integer)
Dim ItemIndex As Long
With SftTree1
ItemIndex = .Items.Add(Folder) ' add folder
.Cell(ItemIndex, 1).Text = Desc ' add description
.Cell(ItemIndex, 3).Text = Count ' add number of messages
.Cell(ItemIndex, 3).Data = Count ' also save number of messages for sorting
' make the folder name bold
.Cell(ItemIndex, 0).Font.Bold = True
' if this folder has no messages (ie. dependents), we still want the
' folder graphic, not the email (leaf) graphic
If Count = 0 Then
axSftTree1_CaretChange(this, new _DSftTreeEvents_CaretChangeEvent(0));
}
private int AddFolder(string Folder, string Desc, int Count)
{
int ItemIndex = axSftTree1.Items.Add(Folder); // add folder
axSftTree1.get_Cell(ItemIndex, 1).Text = Desc; // add description
axSftTree1.get_Cell(ItemIndex, 3).Text = Count.ToString(); // add number of messages
axSftTree1.get_Cell(ItemIndex, 3).Data = Count; // also save number of messages for sorting
// make the folder name bold
if (m_BoldFont == null) {
m_BoldFont = axSftTree1.get_Cell(ItemIndex, 0).Font;
m_BoldFont.Bold = true;
}
axSftTree1.get_Cell(ItemIndex, 0).Font = m_BoldFont;
long CEmailDlg::AddFolder(LPCTSTR lpszFolder, LPCTSTR lpszDescription, int Count)
{
long ItemIndex;
ItemIndex = m_vTree->Items->Add(lpszFolder);
m_vTree->Cell[ItemIndex][1]->Text = lpszDescription;// add description
CString str;
str.Format(_T("%d"), Count);
m_vTree->Cell[ItemIndex][3]->Text = (LPCTSTR) str; // add number of messages
m_vTree->Cell[ItemIndex][3]->Data = Count; // also save number of messages for sorting
// make the folder name bold
IFontDispPtr pFont = m_pBoldCellFont;
m_vTree->Cell[ItemIndex][0]->PutRefFont(pFont);
// if this folder has no messages (ie. dependents), we still want the
// folder graphic, not the email (leaf) graphic
See Also SftTreeCell Object | Object Hierarchy