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
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
SftTree/NET 2.0 - Tree Control
Defines whether sort indicators are shown.
Get
| VB.NET | Style = object.SortIndicators As SftTreeHeaderSortIndicatorsConstants |
| VB | Style = object.SortIndicators As SftTreeHeaderSortIndicatorsConstants |
| C#.NET | SftTreeHeaderSortIndicatorsConstants Style = object.SortIndicators; |
| VC++ | enum SftTreeHeaderSortIndicatorsConstants Style = object->SortIndicators; enum SftTreeHeaderSortIndicatorsConstants Style = object->GetSortIndicators(); |
| C | HRESULT object->get_SortIndicators(enum SftTreeHeaderSortIndicatorsConstants* Style); |
Put
| VB.NET | object.SortIndicators = Style As SftTreeHeaderSortIndicatorsConstants |
| VB | object.SortIndicators = Style As SftTreeHeaderSortIndicatorsConstants |
| C#.NET | SftTreeHeaderSortIndicatorsConstants object.SortIndicators = Style; |
| VC++ | enum SftTreeHeaderSortIndicatorsConstants object->SortIndicators = Style; void object->PutSortIndicators(enum SftTreeHeaderSortIndicatorsConstants Style); |
| C | HRESULT object->put_SortIndicators(enum SftTreeHeaderSortIndicatorsConstants Style); |
object
A SftTreeHeaders object.
Defines whether sort indicators are shown.
| Style | Value | Description |
|---|---|---|
| headerSortIndicatorsSftTreeNone | 0 | None. Sort indicators are not displayed. |
| headerSortIndicatorsSftTreeAuto | 1 | Automatic. Sort indicators are displayed and the tree control automatically responds to mouse button clicks to change sort order and sorted column. |
| headerSortIndicatorsSftTreeManual | 2 | Manual. Sort indicators are displayed but the tree control does not automatically respond to mouse button clicks to change sort order and sorted column. |
The SortIndicators property defines whether sort indicators are shown.
The tree control will never automatically sort the data.
With headerSortIndicatorsSftTreeAuto the tree control automatically updates sort indicators in response to mouse clicks. The ItemClick event (AreaType = constSftTreeColumnHeader) can be used to determine when the header was clicked, meaning the sort indicator was clicked. The Header.SortIndicator property can be used to determine the status of sort indicators when handling the ItemClick event. The application has to sort the data based on the sort indicators, usually using the Items.SortDependents method.
With headerSortIndicatorsSftTreeManual the application must change sort indicators explicitly. The Header.SortIndicator property can be used to update the status of sort indicators. The application has to sort the data based on the sort indicators, usually using the Items.SortDependents method.
AddMessage(1, "anyone@acompany.com", "Re: You're hired", "10/11/05", 6, False)
ItemIndex = AxSftTree1.Items.ItemIndex(m_SavedFolder)
AxSftTree1.get_Item(ItemIndex).Collapse(False)
m_DeletedFolder = AddFolder("Deleted", "Deleted messages", 0)
AxSftTree1.ColumnsObj.MakeOptimal()
AxSftTree1.Items.RecalcHorizontalExtent()
AxSftTree1.Splitter.MakeOptimal()
' allow sorting
AxSftTree1.Headers.SortIndicators = SftTreeHeaderSortIndicatorsConstants.headerSortIndicatorsSftTreeAuto
AxSftTree1.Items.Current = 0
AxSftTree1_CaretChange(Me, New _DSftTreeEvents_CaretChangeEvent(0))
End Sub
Private Sub AxSftTree1_CaretChange(ByVal sender As Object, ByVal e As AxSftTreeLib80._DSftTreeEvents_CaretChangeEvent) Handles AxSftTree1.CaretChange
' set column headers based on selected item
Name = "Microsoft Sans Serif"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
SortIndicators = 0
EndProperty
BeginProperty Footers {9EBAA956-293D-44FA-9989-08F078763A1F}
Appearance = 0
BackColor = -2147483633
ForeColor = -2147483630
GrayedColor = -2147483631
HilightColor = -2147483628
AddMessage(1, "anyone@acompany.com", "Re: You're hired", "10/11/05", 6, false);
ItemIndex = axSftTree1.Items.get_ItemIndex(m_SavedFolder);
axSftTree1.get_Item(ItemIndex).Collapse(false);
m_DeletedFolder = AddFolder("Deleted", "Deleted messages", 0);
axSftTree1.ColumnsObj.MakeOptimal();
axSftTree1.Items.RecalcHorizontalExtent();
axSftTree1.Splitter.MakeOptimal();
// allow sorting
axSftTree1.Headers.SortIndicators = SftTreeHeaderSortIndicatorsConstants.headerSortIndicatorsSftTreeAuto;
axSftTree1.Items.Current = 0;
axSftTree1_CaretChange(this, new _DSftTreeEvents_CaretChangeEvent(0));
}
private int AddFolder(string Folder, string Desc, int Count)
{
AddMessage(1, _T("me@mycompany.com"), _T("You're hired"), _T("10/01/05"), 4, FALSE);
AddMessage(1, _T("anyone@acompany.com"), _T("Re: You're hired"), _T("10/11/05"), 6, FALSE);
m_vTree->Item[m_vTree->Items->ItemIndex[m_SavedFolder]]->Collapse(VARIANT_FALSE);
m_DeletedFolder = AddFolder(_T("Deleted"), _T("Deleted messages"), 0);
m_vTree->ColumnsObj->MakeOptimal();
m_vTree->Items->RecalcHorizontalExtent();
m_vTree->Splitter->MakeOptimal();
// allow sorting
m_vTree->Headers->SortIndicators = headerSortIndicatorsSftTreeAuto;
m_vTree->Items->Current = 0;
OnCaretChangeSftTree1(0); // to update column headers
return TRUE; // return TRUE unless you set the focus to a control
}
See Also SftTreeHeaders Object | Object Hierarchy
