The following parameters are available to set up value editor using binding string:
Name of the parameter |
Type | Description | Mandatory |
CHECKBOX | Logical | Availability for editing. | None |
SPIN | Logical | Availability of arrows enabling to increase or decrease values of specific date components. | None |
DROPCALENDAR | Logical | Date selection from drop-down calendar. | None |
MINVAL | Date | Minimum available value. | None |
MAXVAL | Date | Maximum available value. | None |
VALUE | Date | Default value (TODAY is current day). | None |
SET_FOCUS_ON_CHECK_BOX | Logical | Attribute of focus position on the checkbox on starting the editor. | None |
Logical values are set as a character string of the ON/OFF or the True/False type.
If the CHECKBOX parameter is not set, the checkbox to modify availability will be absent in the editor area.
UI="DatePicker" VALUE="TODAY" MINVAL="01/01/1900" MAXVAL="01/01/2999" DROPCALENDAR="ON" SPIN="OFF"
Executing the example requires a form with the button named Button1 on it, the TabSheetBox component and the UiTabSheet component named UiTabSheet1, which is the data source for TabSheetBox.
Class TestForm: Form
Button1: Button;
UiTabSheet1: UiTabSheet;
TabSheetBox1: TabSheetBox;
Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
BM: IBindingManager;
DatePickerBinding: IBindingDateTimePicker;
DTValue: DateTime;
Begin
BM := New BindingManager.Create;
DatePickerBinding := BM.CreateByUi("DatePicker") As IBindingDateTimePicker;
DatePickerBinding.CheckBox := True;
DatePickerBinding.CheckBoxFocus := True;
DatePickerBinding.DropCalendar := True;
DatePickerBinding.Spin := False;
DTValue := DateTime.Now;
DatePickerBinding.MinValue := DateTime.AddYears(DTValue, -5);
DatePickerBinding.MaxValue := DateTime.AddYears(DTValue, 5);
DatePickerBinding.Value := DTValue;
UiTabSheet1.TabSheet.Cell(0, 0).Style.Binding := DatePickerBinding.AsString;
End Sub Button1OnClick;
End Class TestForm;
Clicking the button sets the value editor for the A0 table cell. On editing the cell date editor is displayed. The date can be set by modifying specific time component values or in the drop-down calendar. The default value is current date. The limit of available values is five years from current date.