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 variant value.
Get
VB.NET | V = object.DataTag As Object |
VB | V = object.DataTag As Variant |
C#.NET | object V = object.DataTag; |
VC++ | _variant_t V = object->DataTag; _variant_t V = object->GetDataTag(); |
C | HRESULT object->get_DataTag(VARIANT* V); |
Put
VB.NET | object.DataTag = V As Object |
VB | object.DataTag = V As Variant |
C#.NET | object object.DataTag = V; |
VC++ | _variant_t object->DataTag = V; void object->PutDataTag(const _variant_t& V); |
C | HRESULT object->put_DataTag(VARIANT V); |
object
A SftTreeCell object.
V
Defines the cell's application specific variant value.
The DataTag property defines the cell's application specific variant value.
The Cell.Data, Cell.DataObject, Cell.DataString properties can be used to store additional application specific data, using other data types (long, objects, strings).
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.
Dim Dt As DateTime ItemIndex = AxSftTree1.Items.Add("5.33") AxSftTree1.get_Cell(ItemIndex, 0).TextHAlign = SftTreeHAlignDefaultConstants.halignSftTreeDefaultRight AxSftTree1.get_Cell(ItemIndex, 1).Text = "Option 1" Dt = DateTime.Today.AddDays(-1) s = "short" SftMaskDateTime.Calendar.FormatDate(Dt, s) AxSftTree1.get_Cell(ItemIndex, 2).Text = s AxSftTree1.get_Cell(ItemIndex, 2).DataTag = Dt ItemIndex = AxSftTree1.Items.Add("122.33") AxSftTree1.get_Cell(ItemIndex, 0).TextHAlign = SftTreeHAlignDefaultConstants.halignSftTreeDefaultRight AxSftTree1.get_Cell(ItemIndex, 1).Text = "Option 3" Dt = DateTime.Today s = "short" SftMaskDateTime.Calendar.FormatDate(Dt, s)
ItemIndex = SftTree1.Items.Add("5.33") SftTree1.Cell(ItemIndex, 0).TextHAlign = halignSftTreeDefaultRight SftTree1.Cell(ItemIndex, 1).Text = "Option 1" Dt = Date - 1 S = "short" SftMaskDateTime.Calendar.FormatDate Dt, S SftTree1.Cell(ItemIndex, 2).Text = S SftTree1.Cell(ItemIndex, 2).DataTag = Dt ItemIndex = SftTree1.Items.Add("122.33") SftTree1.Cell(ItemIndex, 0).TextHAlign = halignSftTreeDefaultRight SftTree1.Cell(ItemIndex, 1).Text = "Option 3" Dt = Date S = "short" SftMaskDateTime.Calendar.FormatDate Dt, S SftTree1.Cell(ItemIndex, 2).Text = S
ItemIndex = axSftTree1.Items.Add("5.33"); axSftTree1.get_Cell(ItemIndex, 0).TextHAlign = SftTreeHAlignDefaultConstants.halignSftTreeDefaultRight; axSftTree1.get_Cell(ItemIndex, 1).Text = "Option 1"; Dt = DateTime.Today.AddDays(-1); string s; s = "short"; SftMaskDateTime.Calendar.FormatDate(Dt, ref s); axSftTree1.get_Cell(ItemIndex, 2).Text = s; axSftTree1.get_Cell(ItemIndex, 2).DataTag = Dt; ItemIndex = axSftTree1.Items.Add("122.33"); axSftTree1.get_Cell(ItemIndex, 0).TextHAlign = SftTreeHAlignDefaultConstants.halignSftTreeDefaultRight; axSftTree1.get_Cell(ItemIndex, 1).Text = "Option 3"; Dt = DateTime.Today; s = "short"; SftMaskDateTime.Calendar.FormatDate(Dt, ref s);
ItemIndex = m_vTree->Items->Add(_T("5.33")); m_vTree->Cell[ItemIndex][0]->TextHAlign = halignSftTreeDefaultRight; m_vTree->Cell[ItemIndex][1]->Text = _T("Option 1"); BSTR str; str = SysAllocString(L"short"); m_vDate->Calendar->FormatDate(Dt-1, &str); m_vTree->Cell[ItemIndex][2]->Text = str; SysFreeString(str); m_vTree->Cell[ItemIndex][2]->DataTag = Dt - 1; ItemIndex = m_vTree->Items->Add(_T("122.33")); m_vTree->Cell[ItemIndex][0]->TextHAlign = halignSftTreeDefaultRight; m_vTree->Cell[ItemIndex][1]->Text = _T("Option 2"); str = SysAllocString(L"short"); m_vDate->Calendar->FormatDate(Dt, &str); m_vTree->Cell[ItemIndex][2]->Text = str;
See Also SftTreeCell Object | Object Hierarchy