mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-11-23 09:59:48 +01: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 }
|
dtaDefault means it is determined by BiDiMode }
|
||||||
TDTCalAlignment = (dtaLeft, dtaRight, dtaDefault);
|
TDTCalAlignment = (dtaLeft, dtaRight, dtaDefault);
|
||||||
|
|
||||||
TDateTimePickerOption = (
|
TDateTimePickerOption = (dtpoDoChangeOnSetDateTime, dtpoEnabledIfUnchecked,
|
||||||
dtpoDoChangeOnSetDateTime, dtpoEnabledIfUnchecked, dtpoAutoCheck, dtpoFlatButton);
|
dtpoAutoCheck, dtpoFlatButton, dtpoResetSelection);
|
||||||
TDateTimePickerOptions = set of TDateTimePickerOption;
|
TDateTimePickerOptions = set of TDateTimePickerOption;
|
||||||
|
|
||||||
{ TCustomDateTimePicker }
|
{ TCustomDateTimePicker }
|
||||||
@ -2717,6 +2717,11 @@ end;
|
|||||||
|
|
||||||
procedure TCustomDateTimePicker.DoEnter;
|
procedure TCustomDateTimePicker.DoEnter;
|
||||||
begin
|
begin
|
||||||
|
if dtpoResetSelection in Options then begin
|
||||||
|
FSelectedTextPart := High(TTextPart);
|
||||||
|
MoveSelectionLR(False);
|
||||||
|
end;
|
||||||
|
|
||||||
inherited DoEnter;
|
inherited DoEnter;
|
||||||
Invalidate;
|
Invalidate;
|
||||||
end;
|
end;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user