Hide

SftDirectory 3.5 - ActiveX File/Folder Control

Display
Print

SftDirectoryHeaders.Style Property

Defines the appearance of the column headers.

Syntax

Get

VB.NETStyle = object.Style As SftDirectoryHeadersStyleConstants
VBStyle = object.Style As SftDirectoryHeadersStyleConstants
C#.NETSftDirectoryHeadersStyleConstants Style = object.Style;
VC++enum SftDirectoryHeadersStyleConstants Style = object->Style;
enum SftDirectoryHeadersStyleConstants Style = object->GetStyle();
CHRESULT object->get_Style(enum SftDirectoryHeadersStyleConstants* Style);

Put

VB.NETobject.Style = Style As SftDirectoryHeadersStyleConstants
VBobject.Style = Style As SftDirectoryHeadersStyleConstants
C#.NETSftDirectoryHeadersStyleConstants object.Style = Style;
VC++enum SftDirectoryHeadersStyleConstants object->Style = Style;
void object->PutStyle(enum SftDirectoryHeadersStyleConstants Style);
CHRESULT object->put_Style(enum SftDirectoryHeadersStyleConstants Style);

object

A SftDirectoryHeaders object.

Style

Defines the appearance of the column headers.

StyleValueDescription
headersSftDirectoryNone0None - Column headers are not displayed.
headersSftDirectoryButton1Button - Column headers are displayed as buttons, which can be clicked.
headersSftDirectoryTitle2Title - Column headers are displayed as titles, which cannot be clicked.

Comments

The Style property defines the appearance of the column headers.

The ComboBoxStyle property defines which portions of a combo box style control (see ControlStyle) have column headers.

The Style property defines the appearance of the column headers and must be set to headersSftDirectoryButton, otherwise the end-user cannot click on column headers for sorting purposes (see Sortable property).

Examples

VB.NET

Private Sub CheckShowHeaders_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckShowHeaders.CheckedChanged
    Dim style As SftDirectoryHeadersStyleConstants

    If CheckShowHeaders.CheckState = CheckState.Checked Then
        style = SftDirectoryHeadersStyleConstants.headersSftDirectoryButton
    Else
        style = SftDirectoryHeadersStyleConstants.headersSftDirectoryNone
    End If
    AxSftDirectoryTV.Headers.Style = style
    AxSftDirectoryDL.Headers.Style = style
    AxSftDirectoryTV_Combo.Headers.Style = style
    AxSftDirectoryDL_Combo.Headers.Style = style
End Sub

Private Sub AxSftDirectoryTV_CheckBoxClicked(ByVal sender As Object, ByVal e As AxSftDirectoryLib30._ISftDirectoryEvents_CheckBoxClickedEvent) Handles AxSftDirectoryTV.CheckBoxClicked
    If e.newValue <> SftDirectoryCheckBoxValueConstants.checkboxSftDirectoryNo And _

VB6

Private Sub CheckShowHeaders_Click()
    Dim Style As SftDirectoryHeadersStyleConstants

    If CheckShowHeaders.Value <> 0 Then
        Style = headersSftDirectoryButton
    Else
        Style = headersSftDirectoryNone
    End If
    SftDirectoryTV.Headers.Style = Style
    SftDirectoryDL.Headers.Style = Style
    SftDirectoryTV_Combo.Headers.Style = Style
    SftDirectoryDL_Combo.Headers.Style = Style
End Sub

Private Sub SftDirectoryTV_CheckBoxClicked(ByVal Folder As SftDirectoryLib30.ISftDirectoryFolder, ByVal OldValue As SftDirectoryLib30.SftDirectoryCheckBoxValueConstants, NewValue As SftDirectoryLib30.SftDirectoryCheckBoxValueConstants)
    If NewValue <> checkboxSftDirectoryNo And NewValue <> checkboxSftDirectoryYes Then

C#

private void CheckShowHeaders_CheckedChanged(object sender, System.EventArgs e) {
    SftDirectoryHeadersStyleConstants style;

    if (CheckShowHeaders.CheckState == CheckState.Checked)
        style = SftDirectoryHeadersStyleConstants.headersSftDirectoryButton;
    else
        style = SftDirectoryHeadersStyleConstants.headersSftDirectoryNone;
    axSftDirectoryTV.Headers.Style = style;
    axSftDirectoryDL.Headers.Style = style;
    axSftDirectoryTV_Combo.Headers.Style = style;
    axSftDirectoryDL_Combo.Headers.Style = style;
}

private void axSftDirectoryTV_CheckBoxClicked(object sender, AxSftDirectoryLib30._ISftDirectoryEvents_CheckBoxClickedEvent e) {
    if (e.newValue != SftDirectoryCheckBoxValueConstants.checkboxSftDirectoryNo &&
            e.newValue != SftDirectoryCheckBoxValueConstants.checkboxSftDirectoryYes) {

C++

    SftDirectoryHeadersStyleConstants style;

    if (m_CheckShowHeaders.GetCheck())
        style = headersSftDirectoryButton;
    else
        style = headersSftDirectoryNone;

    ISftDirectoryPtr vDirTV = m_SftDirectoryTV.GetControlUnknown();
    vDirTV->Headers->Style = style;
    ISftDirectoryPtr vDirDL = m_SftDirectoryDL.GetControlUnknown();
    vDirDL->Headers->Style = style;
    ISftDirectoryPtr vDirTV_Combo = m_SftDirectoryTV_Combo.GetControlUnknown();
    vDirTV_Combo->Headers->Style = style;
    ISftDirectoryPtr vDirDL_Combo = m_SftDirectoryDL_Combo.GetControlUnknown();
    vDirDL_Combo->Headers->Style = style;
}

See Also SftDirectoryHeaders Object | Object Hierarchy


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