HeaderPane
Main
Hide
Share Link
Print

DropOnFocus Property, SftDate Object

Defines whether the dropdown opens when the field gets the input focus.

Syntax

Get

C#bool Boolean = object.DropOnFocus;
VB.NETBoolean = object.DropOnFocus As Boolean
C++VARIANT_BOOL Boolean = object->DropOnFocus;
VARIANT_BOOL Boolean = object->GetDropOnFocus();
CHRESULT object->get_DropOnFocus(VARIANT_BOOL* Boolean);

Put

C#bool object.DropOnFocus = Boolean;
VB.NETobject.DropOnFocus = Boolean As Boolean
C++VARIANT_BOOL object->DropOnFocus = Boolean;
void object->PutDropOnFocus(VARIANT_BOOL Boolean);
CHRESULT object->put_DropOnFocus(VARIANT_BOOL Boolean);

object

A SftDate object.

Boolean

Defines whether the dropdown opens when the field gets the input focus.

Comments

The DropOnFocus property defines whether the dropdown of a date field control opens as soon as the field receives the input focus, by keyboard or mouse. The default is False. p When the field is entered with a click, the dropdown opens once the mouse button is released, so the click doesn't close it again. The dropdown doesn't open if the field is disabled, has no dropdown (buttonsSftDateUpDown, see Buttons) or the application cancels it (DropDownOpening).

Examples

C# View entire sample code

            comboFirstDay.Items.AddRange(new object[] { "(Culture)", "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday" });
            comboFirstDay.SelectedIndex = (int)cal.FirstDayOfWeek;
            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();
        }

VB.NET View entire sample code

        comboFirstDay.Items.AddRange(New Object() {"(Culture)", "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"})
        comboFirstDay.SelectedIndex = CInt(cal.FirstDayOfWeek)
        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

C++ View entire sample code

            ctl->MinDate = fChecked ? first : m_minDate;
            ctl->MaxDate = fChecked ? last : m_maxDate;
        });
        ShowSelection();
        break;
     }
    case IDC_DROPONFOCUS:
        for (int i = 0; i < FIELDS; ++i)
            m_Fields[i]->DropOnFocus = vbChecked;
        break;
    case IDC_AUTOADVANCE:
        for (int i = 0; i < FIELDS; ++i)
            m_Fields[i]->AutoAdvance = vbChecked;
        break;
    case IDC_COLORS:
        for (UINT ctlId = IDC_DATE; ctlId <= IDC_CALENDAR; ++ctlId)

See Also SftDate Object | Object Hierarchy | The Dropdown


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