property CalendarCombo.Background(Part as BackgroundPartEnum) as Color
Returns or sets a value that indicates the background color for parts in the control.

 TypeDescription 
   Part as BackgroundPartEnum A BackgroundPartEnum expression that indicates a part in the control  
   Color A Color expression that indicates the background color for a specified part. 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.  
The Background property specifies a background color or a visual appearance for specific parts in the control. If the Background property is 0, the control draws the part as default. Use the Add method to add new skins to the control. Use the Remove method to remove a specific skin from the control.

The following VB sample changes the visual appearance for the drop down button. The sample uses the "" skin when the drop down button is up, and the "" when it is down.

With CalendarCombo1
    With .VisualAppearance
        .Add &H25, "D:\Temp\ExCalendar.Help\dropup.ebn"
        .Add &H26, "D:\Temp\ExCalendar.Help\dropdown.ebn"
    End With
    .Background(exDropDownButtonUp) = &H25000000
    .Background(exDropDownButtonDown) = &H26000000
End With

The following C++ sample changes the visual appearance for the drop down button:

m_calendarcombo.GetVisualAppearance().Add( 0x25, COleVariant("D:\\Temp\\ExCalendar.Help\\dropup.ebn"));
m_calendarcombo.GetVisualAppearance().Add( 0x26, COleVariant("D:\\Temp\\ExCalendar.Help\\dropdown.ebn"));
m_calendarcombo.SetBackground( 4 /*exDropDownButtonUp*/, 0x25000000 );
m_calendarcombo.SetBackground( 5 /*exDropDownButtonDown*/, 0x26000000 );

The following VB.NET sample changes the visual appearance for the drop down button:

With AxCalendarCombo1
    With .VisualAppearance
        .Add(&H25, "D:\Temp\ExCalendar.Help\dropup.ebn")
        .Add(&H26, "D:\Temp\ExCalendar.Help\dropdown.ebn")
    End With
    .set_Background(EXCALENDARLib.BackgroundPartEnum.exDropDownButtonUp, &H25000000)
    .set_Background(EXCALENDARLib.BackgroundPartEnum.exDropDownButtonDown, &H26000000)
End With

The following C# sample changes the visual appearance for the drop down button:

axCalendarCombo1.VisualAppearance.Add(0x25, "D:\\Temp\\ExCalendar.Help\\dropup.ebn");
axCalendarCombo1.VisualAppearance.Add(0x26, "D:\\Temp\\ExCalendar.Help\\dropdown.ebn");
axCalendarCombo1.set_Background(EXCALENDARLib.BackgroundPartEnum.exDropDownButtonUp, 0x25000000);
axCalendarCombo1.set_Background(EXCALENDARLib.BackgroundPartEnum.exDropDownButtonDown, 0x26000000);

The following VFP sample changes the visual appearance for the drop down button:

With thisform.CalendarCombo1
    With .VisualAppearance
        .Add(37, "D:\Temp\ExCalendar.Help\dropup.ebn")
        .Add(38, "D:\Temp\ExCalendar.Help\dropdown.ebn")
    EndWith
    .Background(4) = 620756992	&& exDropDownButtonUp
    .Background(5) = 637534208	&& exDropDownButtonDown
EndWith

where the 620756992 is 0x25000000 in hexa, and 37 is 0x25 in hexa


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