HeaderPane
Main
Hide
Share Link
Print

DayFormatting Event, SftCalendar Object

A day of a calendar is about to be shown.

Syntax

C#void object_DayFormatting(object sender, AxSftDateLib20._ISftCalendarEvents_DayFormattingEvent e);
VB.NETPrivate Sub object_DayFormatting(ByVal sender As Object, ByVal e As AxSftDateLib20._ISftCalendarEvents_DayFormattingEvent) Handles object.DayFormatting
C++void OnDayFormattingobject(ISftDateDayFormatting* Day);
CHRESULT OnDayFormattingobject(ISftDateDayFormatting* Day);

object

A SftCalendar object.

Day

A SftDateDayFormatting object describing the day. The application changes its properties to format the day.

Comments

The DayFormatting event occurs the first time a calendar shows a day: in a month calendar control, and in the dropdown calendar of a date field control. The Day object holds the formatting of the special date that applies (SpecialDates) and the application can change any of it: colors, bold text, font, picture, tooltip, a text instead of the day number, and whether the day can be selected. p The result is kept until a setting or a special date changes or the application calls Calendar.RefreshDays. The dropdown calendar of a date field control formats its days each time the dropdown opens. p The event occurs while the control paints; the application doesn't change other settings of the control in it.

Examples

VB.NET View entire sample code

    End Sub

    Private Sub field_DayFormatting(sender As Object, e As _ISftDateEvents_DayFormattingEvent) Handles fieldDate.DayFormatting, fieldLongDate.DayFormatting,
            fieldTimeList.DayFormatting, fieldTimeClock.DayFormatting, fieldDateTime.DayFormatting, fieldRange.DayFormatting,
            fieldOptional.DayFormatting, fieldEmpty.DayFormatting, fieldFreeForm.DayFormatting, fieldCustom.DayFormatting
        FormatDay(e.day)
    End Sub

    Private Sub sftCalendar_DayFormatting(sender As Object, e As _ISftCalendarEvents_DayFormattingEvent) Handles sftCalendar.DayFormatting
        FormatDay(e.day)
    End Sub

    Private Sub option_Changed(sender As Object, e As EventArgs) Handles comboCulture.SelectedIndexChanged, comboDarkMode.SelectedIndexChanged,
            comboHighContrast.SelectedIndexChanged, comboButtons.SelectedIndexChanged, comboBorder.SelectedIndexChanged,
            comboAlignment.SelectedIndexChanged, comboAcross.SelectedIndexChanged, comboDown.SelectedIndexChanged,
            comboWeekNumbers.SelectedIndexChanged, comboFirstDay.SelectedIndexChanged, comboViews.SelectedIndexChanged,

See Also SftCalendar Object | Object Hierarchy | Day Formatting


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