Defines whether the dropdown opens when the field gets the input focus.
Get
| C# | bool Boolean = object.DropOnFocus; |
| VB.NET | Boolean = object.DropOnFocus As Boolean |
| C++ | VARIANT_BOOL Boolean = object->DropOnFocus; VARIANT_BOOL Boolean = object->GetDropOnFocus(); |
| C | HRESULT object->get_DropOnFocus(VARIANT_BOOL* Boolean); |
Put
| C# | bool object.DropOnFocus = Boolean; |
| VB.NET | object.DropOnFocus = Boolean As Boolean |
| C++ | VARIANT_BOOL object->DropOnFocus = Boolean; void object->PutDropOnFocus(VARIANT_BOOL Boolean); |
| C | HRESULT object->put_DropOnFocus(VARIANT_BOOL Boolean); |
object
Boolean
Defines whether the dropdown opens when the field gets the input focus.
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).
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();
}
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
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