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 horizontal alignment of the text in this cell.
Get
VB.NET | Style = object.TextHAlign As SftTreeHAlignDefaultConstants |
VB | Style = object.TextHAlign As SftTreeHAlignDefaultConstants |
C#.NET | SftTreeHAlignDefaultConstants Style = object.TextHAlign; |
VC++ | enum SftTreeHAlignDefaultConstants Style = object->TextHAlign; enum SftTreeHAlignDefaultConstants Style = object->GetTextHAlign(); |
C | HRESULT object->get_TextHAlign(enum SftTreeHAlignDefaultConstants* Style); |
Put
VB.NET | object.TextHAlign = Style As SftTreeHAlignDefaultConstants |
VB | object.TextHAlign = Style As SftTreeHAlignDefaultConstants |
C#.NET | SftTreeHAlignDefaultConstants object.TextHAlign = Style; |
VC++ | enum SftTreeHAlignDefaultConstants object->TextHAlign = Style; void object->PutTextHAlign(enum SftTreeHAlignDefaultConstants Style); |
C | HRESULT object->put_TextHAlign(enum SftTreeHAlignDefaultConstants Style); |
object
A SftTreeCell object.
Style
Defines the horizontal alignment of the text in this cell.
Name | Value | Description |
---|---|---|
halignSftTreeDefaultLeft | -1 | The text is aligned as defined using the default settings for this cell's column (see Column.CellHAlign). |
halignSftTreeDefaultLeft | 0 | The cell text is left aligned. |
halignSftTreeDefaultCenter | 1 | The cell text is centered in the cell. |
halignSftTreeDefaultRight | 2 | The cell text is right aligned. |
The TextHAlign property defines the horizontal alignment of the text in this cell.
The Cell.TextVAlign property is used to define the vertical alignment of the text in this cell.
The TextHAlign property determines the position of the cell text and graphic, defined using the Cell.Text and Cell.Image properties. It overrides the column's default alignment defined using the Column.CellHAlign property.
ItemIndex = AxSftTree1.Items.Add("Edit cells" & ControlChars.CrLf & "using SftMask/OCX:") AxSftTree1.get_Item(ItemIndex).EditIgnore = True AxSftTree1.get_Cell(ItemIndex, 1).Text = ControlChars.CrLf & "using SftBox/OCX:" AxSftTree1.get_Cell(ItemIndex, 2).Text = "and again" & ControlChars.CrLf & "using SftMask/OCX:" 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")
"drop down button to access the popup calendar." ItemIndex = SftTree1.Items.Add("Edit cells" & vbCr & vbLf & "using SftMask/OCX:") SftTree1.Item(ItemIndex).EditIgnore = True SftTree1.Cell(ItemIndex, 1).Text = vbCr & vbLf & "using SftBox/OCX:" SftTree1.Cell(ItemIndex, 2).Text = "and again" & vbCr & vbLf & "using SftMask/OCX:" 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 = axSftTree1.Items.Add("Edit cells\r\nusing SftMask/OCX:"); axSftTree1.get_Item(ItemIndex).EditIgnore = true; axSftTree1.get_Cell(ItemIndex, 1).Text = "\r\nusing SftBox/OCX:"; axSftTree1.get_Cell(ItemIndex, 2).Text = "and again\r\nusing SftMask/OCX:"; DateTime Dt; 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;
DATE Dt = (DATE) COleDateTime::GetCurrentTime(); ItemIndex = m_vTree->Items->Add(_T("Edit cells\nusing SftMask/OCX:")); m_vTree->Item[ItemIndex]->EditIgnore = VARIANT_TRUE; m_vTree->Cell[ItemIndex][1]->Text = _T("\nusing SftBox/OCX:"); m_vTree->Cell[ItemIndex][2]->Text = _T("and again\nusing SftMask/OCX:"); 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;
See Also SftTreeCell Object | Object Hierarchy