HeaderPane
Main
Hide
Share Link
Print

ValueChanged Event, SftCalendar Object

The selected date changed.

Syntax

C#void object_ValueChanged(object sender, System.EventArgs e);
VB.NETPrivate Sub object_ValueChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles object.ValueChanged
C++void OnValueChangedobject();
CHRESULT OnValueChangedobject();

object

A SftCalendar object.

Comments

The ValueChanged event occurs when the value of the control changes (Value), by the user or the application. p In range selection mode, ValueChanged occurs when the first date of the range changes; RangeChanged reports every change of the range.

Examples

VB.NET View entire sample code

                selection = "Selected: " & FormatLongDate(start) & " - " & FormatLongDate([end])
            End If
        ElseIf TypeOf sftCalendar.Value Is Date Then
            selection = "Selected: " & FormatLongDate(CDate(sftCalendar.Value))
        End If
        labelSelection.Text = selection
    End Sub

    Private Sub sftCalendar_ValueChanged(sender As Object, e As EventArgs) Handles sftCalendar.ValueChanged, sftCalendar.RangeChanged
        ShowSelection()
    End Sub

    ' Colors set by the application are used as given in dark mode too, so the scheme has a variant for each mode.
    Private Sub SetColorScheme(cal As SftDateCalendar, dark As Boolean, [on] As Boolean)
        cal.TitleBackColor = If([on], Ole(Color.FromArgb(0, 95, 115)), DefaultColor)
        cal.TitleForeColor = If([on], Ole(Color.White), DefaultColor)

See Also SftCalendar Object | Object Hierarchy | Values


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