HeaderPane
Main
Hide
Share Link
Print

DropDownOpened Event, SftDate Object

The dropdown opened.

Syntax

C#void object_DropDownOpened(object sender, System.EventArgs e);
VB.NETPrivate Sub object_DropDownOpened(ByVal sender As Object, ByVal e As System.EventArgs) Handles object.DropDownOpened
C++void OnDropDownOpenedobject();
CHRESULT OnDropDownOpenedobject();

object

A SftDate object.

Comments

The DropDownOpened event occurs when the dropdown has opened. The dropdown never takes the input focus: the field keeps it and passes the keys on to the dropdown.

Examples

C# View entire sample code

        }

        private void field_DropDownOpening(object sender, _ISftDateEvents_DropDownOpeningEvent e) {
            // e.cancel = true would keep the dropdown closed
            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) {

VB.NET View entire sample code

        LogEvent(sender, "TextParsing", "Text=" & e.text & " Current=" & FormatDate(e.current) & " Handled=" & e.handled & " Value=" & FormatDate(e.value))
    End Sub

    Private Sub field_DropDownOpening(sender As Object, e As _ISftDateEvents_DropDownOpeningEvent) Handles fieldAppointment.DropDownOpening, fieldDueDate.DropDownOpening
        ' 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

C++ View entire sample code

// The fields and the calendar share their event dispids, so each event has one handler for all three controls; MFC passes the
// 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)

See Also SftDate Object | Object Hierarchy | The Dropdown


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