mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-05-30 10:42:43 +02:00
DateTimePicker: add option dtpoResetSelection
git-svn-id: trunk@60614 -
This commit is contained in:
parent
8518262eef
commit
66f30ba367
@ -119,8 +119,8 @@ type
|
||||
dtaDefault means it is determined by BiDiMode }
|
||||
TDTCalAlignment = (dtaLeft, dtaRight, dtaDefault);
|
||||
|
||||
TDateTimePickerOption = (
|
||||
dtpoDoChangeOnSetDateTime, dtpoEnabledIfUnchecked, dtpoAutoCheck, dtpoFlatButton);
|
||||
TDateTimePickerOption = (dtpoDoChangeOnSetDateTime, dtpoEnabledIfUnchecked,
|
||||
dtpoAutoCheck, dtpoFlatButton, dtpoResetSelection);
|
||||
TDateTimePickerOptions = set of TDateTimePickerOption;
|
||||
|
||||
{ TCustomDateTimePicker }
|
||||
@ -2717,6 +2717,11 @@ end;
|
||||
|
||||
procedure TCustomDateTimePicker.DoEnter;
|
||||
begin
|
||||
if dtpoResetSelection in Options then begin
|
||||
FSelectedTextPart := High(TTextPart);
|
||||
MoveSelectionLR(False);
|
||||
end;
|
||||
|
||||
inherited DoEnter;
|
||||
Invalidate;
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user