Hide

SftTree/OCX 7.5 - ActiveX Tree Control

Display
Print

Text Property, SftTreeHeader Object

Defines this column header's text.

Syntax

Get

VB.NETString = object.Text As String
VBString = object.Text As String
C#.NETstring String = object.Text;
VC++_bstr_t String = object->Text;
_bstr_t String = object->GetText();
CHRESULT object->get_Text(BSTR* String);

Put

VB.NETobject.Text = String As String
VBobject.Text = String As String
C#.NETstring object.Text = String;
VC++_bstr_t object->Text = String;
void object->PutText(_bstr_t String);
CHRESULT object->put_Text(BSTR String);

object

A SftTreeHeader object.

String

Defines this column header's text.

Comments

The Text property defines this column header's text.

The alignment of the column header text can be defined using the Header.TextHAlign and Header.TextVAlign properties.

The column header text may contain new-line characters (CR-LF) if multi-line header text is enabled (see Headers.Multiline).

If the column header text is empty, the column header of the preceding column may merge into the empty column header, based on the Column.Merge and Column.MergeInto property settings. The row/column header never merges into a column header.

When defining column header text using the Columns property page, any trailing empty lines are automatically removed. To preserve a trailing empty line, add a space character to the line.

Examples

VB.NET

        AxSftTree1_CaretChange(Me, New _DSftTreeEvents_CaretChangeEvent(0))
    End Sub

    Private Sub AxSftTree1_CaretChange(ByVal sender As Object, ByVal e As AxSftTreeLib75._DSftTreeEvents_CaretChangeEvent) Handles AxSftTree1.CaretChange
        ' set column headers based on selected item
        Dim ID As Integer
        ID = AxSftTree1.get_Item(e.itemIndex).ID
        If ID = m_InboxFolder Or ID = m_OutboxFolder Or ID = m_SavedFolder Or ID = m_DeletedFolder Then
            AxSftTree1.get_Header(0).Text = "Folder"
            AxSftTree1.get_Header(1).Text = "Description"
            AxSftTree1.get_Header(2).Text = "" ' we can use this to merge the adjacent title
            AxSftTree1.get_Header(3).Text = "Msgs"
        Else
            AxSftTree1.get_Header(0).Text = "From"
            AxSftTree1.get_Header(1).Text = "Subject"
            AxSftTree1.get_Header(2).Text = "Received"

VB6

    End With
End Sub

Private Sub SftTree1_CaretChange(ByVal ItemIndex As Long)
    With SftTree1
        ' set column headers based on selected item
        Select Case .Item(ItemIndex).ID
        Case InboxFolder, OutboxFolder, SavedFolder, DeletedFolder
            .Header(0).Text = "Folder"
            .Header(1).Text = "Description"
            .Header(2).Text = ""    ' we can use this to merge the adjacent title
            .Header(3).Text = "Msgs"
        Case Else
            .Header(0).Text = "From"
            .Header(1).Text = "Subject"
            .Header(2).Text = "Received"

C#

            }
            return axSftTree1.get_Item(ItemIndex).ID;
        }

        private void axSftTree1_CaretChange(object sender, AxSftTreeLib75._DSftTreeEvents_CaretChangeEvent e) {
            // set column headers based on selected item
            int ID = axSftTree1.get_Item(e.itemIndex).ID;
            if (ID == m_InboxFolder || ID == m_OutboxFolder || ID == m_SavedFolder || ID == m_DeletedFolder) {
                axSftTree1.get_Header(0).Text = "Folder";
                axSftTree1.get_Header(1).Text = "Description";
                axSftTree1.get_Header(2).Text = ""; // we can use this to merge the adjacent title
                axSftTree1.get_Header(3).Text = "Msgs";
            } else {
                axSftTree1.get_Header(0).Text = "From";
                axSftTree1.get_Header(1).Text = "Subject";
                axSftTree1.get_Header(2).Text = "Received";

C++

}

void CEmailDlg::OnCaretChangeSftTree1(long ItemIndex)
{
    // set column headers based on selected item
    // we saved a value in ItemData telling us if it's a folder
    if (m_vTree->Item[ItemIndex]->ID == m_InboxFolder || m_vTree->Item[ItemIndex]->ID == m_OutboxFolder
            || m_vTree->Item[ItemIndex]->ID == m_SavedFolder || m_vTree->Item[ItemIndex]->ID == m_DeletedFolder) {
        m_vTree->Header[0]->Text = _T("Folder");
        m_vTree->Header[1]->Text = _T("Description");
        m_vTree->Header[2]->Text = _T(""); // we can use this to merge the adjacent title
        m_vTree->Header[3]->Text = _T("Msgs");
    } else {
        m_vTree->Header[0]->Text = _T("From");
        m_vTree->Header[1]->Text = _T("Subject");
        m_vTree->Header[2]->Text = _T("Received");

See Also SftTreeHeader Object | Object Hierarchy


Last Updated 08/13/2020 - (email)
© 2024 Softel vdm, Inc.