HeaderPane
Main
Hide
Share Link
Print

DropDownClosed Event, SftDate Object

The dropdown closed.

Syntax

C#void object_DropDownClosed(object sender, System.EventArgs e);
VB.NETPrivate Sub object_DropDownClosed(ByVal sender As Object, ByVal e As System.EventArgs) Handles object.DropDownClosed
C++void OnDropDownClosedobject();
CHRESULT OnDropDownClosedobject();

object

A SftDate object.

Comments

The DropDownClosed event occurs when the dropdown has closed, after a value was chosen, with Escape, a click outside the dropdown, the field losing the input focus or the CloseDropDown method.

Examples

C# View entire sample code

            LogEvent(sender, "DropDownOpening", "Cancel=" + e.cancel);
        }

        private void field_DropDownOpened(object sender, EventArgs e) {
            LogEvent(sender, "DropDownOpened");
        }

        private void field_DropDownClosed(object sender, EventArgs e) {
            LogEvent(sender, "DropDownClosed");
        }

        private void field_DarkModeChange(object sender, _ISftDateEvents_DarkModeChangeEvent e) {
            LogEvent(sender, "DarkModeChange", "Active=" + e.active);
        }

        private void field_HighContrastChange(object sender, _ISftDateEvents_HighContrastChangeEvent e) {

VB.NET View entire sample code

        ' e.cancel = True would keep the dropdown closed
        LogEvent(sender, "DropDownOpening", "Cancel=" & e.cancel)
    End Sub

    Private Sub field_DropDownOpened(sender As Object, e As EventArgs) Handles fieldAppointment.DropDownOpened, fieldDueDate.DropDownOpened
        LogEvent(sender, "DropDownOpened")
    End Sub

    Private Sub field_DropDownClosed(sender As Object, e As EventArgs) Handles fieldAppointment.DropDownClosed, fieldDueDate.DropDownClosed
        LogEvent(sender, "DropDownClosed")
    End Sub

    Private Sub field_DarkModeChange(sender As Object, e As _ISftDateEvents_DarkModeChangeEvent) Handles fieldAppointment.DarkModeChange, fieldDueDate.DarkModeChange
        LogEvent(sender, "DarkModeChange", "Active=" & e.active)
    End Sub

C++ View entire sample code

// control ID first (the leading VTS_I4).
BEGIN_EVENTSINK_MAP(CMainDlg, CDialog)
    ON_EVENT_RANGE(CMainDlg, IDC_APPOINTMENT, IDC_CALENDAR, 1 /* ValueChanged */, OnValueChanged, VTS_I4)
    ON_EVENT_RANGE(CMainDlg, IDC_APPOINTMENT, IDC_CALENDAR, 2 /* RangeChanged */, OnRangeChanged, VTS_I4)
    ON_EVENT_RANGE(CMainDlg, IDC_APPOINTMENT, IDC_CALENDAR, 3 /* ValueValidating */, OnValueValidating, VTS_I4 VTS_PVARIANT VTS_PVARIANT VTS_PBOOL)
    ON_EVENT_RANGE(CMainDlg, IDC_APPOINTMENT, IDC_CALENDAR, 4 /* TextParsing */, OnTextParsing, VTS_I4 VTS_BSTR VTS_VARIANT VTS_PBOOL VTS_PVARIANT)
    ON_EVENT_RANGE(CMainDlg, IDC_APPOINTMENT, IDC_CALENDAR, 5 /* DropDownOpening */, OnDropDownOpening, VTS_I4 VTS_PBOOL)
    ON_EVENT_RANGE(CMainDlg, IDC_APPOINTMENT, IDC_CALENDAR, 6 /* DropDownOpened */, OnDropDownOpened, VTS_I4)
    ON_EVENT_RANGE(CMainDlg, IDC_APPOINTMENT, IDC_CALENDAR, 7 /* DropDownClosed */, OnDropDownClosed, VTS_I4)
    ON_EVENT_RANGE(CMainDlg, IDC_APPOINTMENT, IDC_CALENDAR, 9 /* DateActivated */, OnDateActivated, VTS_I4 VTS_DATE)
    ON_EVENT_RANGE(CMainDlg, IDC_APPOINTMENT, IDC_CALENDAR, 10 /* ViewChanged */, OnViewChanged, VTS_I4)
    ON_EVENT_RANGE(CMainDlg, IDC_APPOINTMENT, IDC_CALENDAR, 11 /* DisplayChanged */, OnDisplayChanged, VTS_I4)
    ON_EVENT_RANGE(CMainDlg, IDC_APPOINTMENT, IDC_CALENDAR, 12 /* TodayClicked */, OnTodayClicked, VTS_I4)
    ON_EVENT_RANGE(CMainDlg, IDC_APPOINTMENT, IDC_CALENDAR, 13 /* ClearClicked */, OnClearClicked, VTS_I4)
    ON_EVENT_RANGE(CMainDlg, IDC_APPOINTMENT, IDC_CALENDAR, 14 /* DarkModeChange */, OnDarkModeChange, VTS_I4 VTS_BOOL)
    ON_EVENT_RANGE(CMainDlg, IDC_APPOINTMENT, IDC_CALENDAR, 15 /* HighContrastChange */, OnHighContrastChange, VTS_I4 VTS_BOOL)

See Also SftDate Object | Object Hierarchy | The Dropdown


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