property Tree.BackColorSortBar as Color
Retrieves or sets a value that indicates the sort bar's background color. /*not supported in the lite version*/

 TypeDescription 
   Color A color expression that indicates the background color of the sort bar. The last 7 bits in the high significant byte of the color to indicates the identifier of the skin being used. Use the Add method to add new skins to the control. If you need to remove the skin appearance from a part of the control you need to reset the last 7 bits in the high significant byte of the color being applied to the background's part.  
Use the BackColorSortBar property to specify the background color of the control's sort bar. Use the SortBarVisible property to show the control's sort bar. Use the BackColorSortBarCaption property to specify the background color of the caption of the sort bar. The caption of the sort bar is visible, if there are no columns in the sort bar. Use the SortBarCaption property to specify the caption of the sort bar. Use the ForeColorSortBar property to specify the foreground color of the control's sort bar. Use the BackColor property to specify the control's background color. Use the BackColorHeader property to specify the background color of the control's header bar. Use the BackColorLevelHeader property to specify the background color of the control's header bar when multiple levels are displayed.

The following VB sample changes the appearance for the control's sort bar. The sample uses the "" skin.

With Tree1
    .SortBarVisible = True
    With .VisualAppearance
        .Add &H60, App.Path + "\sortbar.ebn"
    End With
    .ForeColorSortBar = 0
    .BackColorSortBar = &H60000000
    .BackColorSortBarCaption = .BackColorSortBar
End With

The following C++ sample changes the appearance for the control's sort bar:

#include "Appearance.h"
m_tree.GetVisualAppearance().Add( 0x60, COleVariant(_T("D:\\Temp\\ExTree.Help\\sortbar.ebn")) );
m_tree.SetSortBarVisible( TRUE );
m_tree.SetBackColorSortBar( 0x60000000 );
m_tree.SetBackColorSortBarCaption( m_tree.GetBackColorSortBar() );

The following VB.NET sample changes the appearance for the control's sort bar:

With AxTree1
    .SortBarVisible = True
    With .VisualAppearance
        .Add(&H60, "D:\Temp\ExTree.Help\sortbar.ebn")
    End With
    .Template = "BackColorSortBar = 1610612736"
    .Template = "BackColorSortBarCaption = 1610612736"
    .ForeColorSortBar = Color.Black
End With

The following C# sample changes the appearance for the control's sort bar:

axTree1.VisualAppearance.Add(0x60, "D:\\Temp\\ExTree.Help\\sortbar.ebn");
axTree1.SortBarVisible = true;
axTree1.Template = "BackColorSortBar = 1610612736";
axTree1.Template = "BackColorSortBarCaption = 1610612736";
axTree1.ForeColorSortBar = Color.Black;

The following VFP sample changes the appearance for the control's sort bar

With thisform.Tree1
    With .VisualAppearance
        .Add(96, "D:\Temp\ExTree.Help\sortbar.ebn")
    EndWith
    .SortBarVisible =.t.
    .BackColorSortBar = 1610612736
    .BackColorSortBarCaption = .BackColorSortBar
    .ForeColorSortBar = 0
EndWith

 


Send comments on this topic.
1999-2017 Exontrol.COM, Software. All rights reserved.