property Calendar.SelBackColor as Color
Retrieves or sets a value that indicates the selection background color.

 TypeDescription 
   Color A color expression that specifies the selection background color. 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 SelBackColor and SelForeColor properties to define the colors for selected date(s).

The following VB sample changes the visual appearance for the selected date. The SelBackColor property indicates the selection background color. Shortly, we need to add a skin to the Appearance object using the Add method, and we need to set the last 7 bits in the SelBackColor property to indicates the index of the skin that we want to use. The sample applies the "" to the selected date(s):

With Calendar1
    With .VisualAppearance
        .Add &H23, "D:\Temp\ExCalendar.Help\seldate.ebn"
    End With
    .SelBackColor = &H23000000
End With

The following C++ sample changes the visual appearance for selected date:

m_calendar.GetVisualAppearance().Add( 0x23, COleVariant("D:\\Temp\\ExCalendar.Help\\seldate.ebn"));
m_calendar.SetSelBackColor( 0x23000000 );

The following VB.NET sample changes the visual appearance for selected date:

With AxCalendar1
    With .VisualAppearance
        .Add(&H23, "D:\Temp\ExCalendar.Help\seldate.ebn")
    End With
    .Template = "SelBackColor = 587202560"
End With

where the 587202560 value in hexa representation is &H23000000 

The following C# sample changes the visual appearance for selected date:

axCalendar1.VisualAppearance.Add(0x23, "D:\\Temp\\ExCalendar.Help\\seldate.ebn");
axCalendar1.Template = "SelBackColor = 587202560";

where the 587202560 value in hexa representation is 0x23000000 

The following VFP sample changes the visual appearance for selected date:

With thisform.Calendar1
    With .VisualAppearance
        .Add(35, "D:\Temp\ExCalendar.Help\seldate.ebn")
    EndWith
    .SelBackColor = 587202560
EndWith

where the 587202560 value in hexa representation is 0x23000000, 35 is 0x23 in hexa


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