HeaderPane
Main
Hide
Share Link
Print

UseThemes Property, SftCalendar Object

Defines whether Windows themes are used.

Syntax

Get

C#bool Boolean = object.UseThemes;
VB.NETBoolean = object.UseThemes As Boolean
C++VARIANT_BOOL Boolean = object->UseThemes;
VARIANT_BOOL Boolean = object->GetUseThemes();
CHRESULT object->get_UseThemes(VARIANT_BOOL* Boolean);

Put

C#bool object.UseThemes = Boolean;
VB.NETobject.UseThemes = Boolean As Boolean
C++VARIANT_BOOL object->UseThemes = Boolean;
void object->PutUseThemes(VARIANT_BOOL Boolean);
CHRESULT object->put_UseThemes(VARIANT_BOOL Boolean);

object

A SftCalendar object.

Boolean

Defines whether Windows themes are used.

Comments

The UseThemes property defines whether the control uses the current Windows theme (visual styles). The default is True. p With themes, a date field control draws its check box, buttons and border using the theme, and a calendar (a month calendar control or the dropdown calendar of a date field control) draws the selected day, the day under the mouse and today's marker using the theme of the Windows month calendar control. A calendar uses the theme only in light mode and only as long as the application doesn't define the colors BackColor, SelectedBackColor, HotBackColor and TodayColor. p Without themes, the parts are drawn in the classic style. Themes are not used in high contrast mode (HighContrastMode).

Examples

C# View entire sample code

            comboViews.Items.AddRange(new object[] { "All", "Month and year", "Month only" });
            comboViews.SelectedIndex = Math.Max(0, Array.IndexOf(viewSets, cal.AllowedViews));
            checkTrailing.Checked = cal.ShowTrailingDates;
            checkTodayButton.Checked = cal.ShowTodayButton;
            checkHighlightToday.Checked = cal.HighlightToday;
            checkClearButton.Checked = cal.ShowClearButton;
            checkDropOnFocus.Checked = fieldDate.DropOnFocus;
            checkAutoAdvance.Checked = fieldDate.AutoAdvance;
            checkThemes.Checked = sftCalendar.UseThemes;

            initialized = true;
            ShowSelection();
            DoLayout();
        }

        // The calendar sizes itself to its months, so its group box, the selection text, the Close button and the form follow it.

VB.NET View entire sample code

        comboViews.Items.AddRange(New Object() {"All", "Month and year", "Month only"})
        comboViews.SelectedIndex = Math.Max(0, Array.IndexOf(viewSets, cal.AllowedViews))
        checkTrailing.Checked = cal.ShowTrailingDates
        checkTodayButton.Checked = cal.ShowTodayButton
        checkHighlightToday.Checked = cal.HighlightToday
        checkClearButton.Checked = cal.ShowClearButton
        checkDropOnFocus.Checked = fieldDate.DropOnFocus
        checkAutoAdvance.Checked = fieldDate.AutoAdvance
        checkThemes.Checked = sftCalendar.UseThemes

        initialized = True
        ShowSelection()
        DoLayout()
    End Sub

    ' The calendar sizes itself to its months, so its group box, the selection text, the Close button and the form follow it.

See Also SftCalendar Object | Object Hierarchy | Using Themes


Last Updated 11/29/2026 - (email)
© 2026 Softel vdm, Inc.