Registriert seit: 13. Okt 2010
Ort: Bayern
490 Beiträge
Delphi 10.4 Sydney
|
AW: DateTimePicker ReadOnly?
27. Okt 2011, 13:40
Zwei witzige Lösungen von experts-exchange:
-) change DragMode property of DateTimePicker to dmAutomatic;
-)
Delphi-Quellcode:
procedure TForm1.DateTimePicker1DropDown(Sender: TObject);
begin
PostMessage(GetFocus(), WM_SYSKEYDOWN, VK_MENU, 0);
PostMessage(GetFocus(), WM_SYSKEYDOWN, VK_UP, 0);
PostMessage(GetFocus(), WM_SYSKEYUP, VK_UP, 0);
PostMessage(GetFocus(), WM_KEYUP, VK_MENU, 0);
end;
procedure TForm1.DateTimePicker1KeyDown(Sender: TObject; var Key: Word;
Shift: TShiftState);
begin
Key := 0;
end;
Nr.1 Delphi-Tool: [F7]
|
|
Zitat
|