HeaderPane
Main
Hide
Share Link
Print

Field Components

A date field control (SftDate) shows one value: a date, a time, a date and time, or a range of dates. The value is shown in the format defined by the Format property, in the culture defined by the Culture property.

ComponentDescription
Check boxShown in front of the value when the ShowCheckBox property is set to True. While it is cleared, the value is shown dimmed and the Value property is Null (see Values and Empty Fields).
ValueThe formatted value. Each part of it (day, month, year, hours, minutes, ...) is edited separately, or the whole value is typed as text (see Editing).
Clear buttonShown while the field has a value when the ShowClearButton property is set to True. It empties the field, or clears its check box.
Up and down buttonsChange the part of the value being edited. They are shown when the Buttons property is set to buttonsSftDateUpDown or buttonsSftDateDropDownAndUpDown. Holding a button down repeats the change, and after 25 repeats the part changes in steps of 10.
Dropdown buttonOpens the dropdown with a calendar, a time selection or both (see The Dropdown). It is shown with buttonsSftDateDropDown (the default) and buttonsSftDateDropDownAndUpDown.

With buttonsSftDateNone the field shows no buttons, but the keyboard (F4, Alt+Down) and the OpenDropDown method still open the dropdown. With buttonsSftDateUpDown the field has no dropdown.

sftDate1.Buttons = SftDateButtonsConstants.buttonsSftDateDropDownAndUpDown;
sftDate1.ShowClearButton = true;
sftDate1.AllowEmpty = true;

The border of the field is drawn by the control itself and is defined by the BorderStyle property: borderSftDateFixedSingle (a thin line, the default), borderSftDateFixed3D (the Windows theme's border of date fields) or borderSftDateNone. The color of a borderSftDateFixedSingle border is defined by the BorderColor property (see Colors).

With the AutoSize property (CtlAutoSize in Windows Forms) set to True (the default), the field's height follows its font and its border; its width remains the width the application gives it. The PreferredHeight property returns the height the field needs for its font and border, the PreferredWidth property the width that also fits the current value, the check box and the buttons.

The HitTest method returns the component at a location (see Hit Testing).


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