Hai ibp,
noch nicht so ganz 100%. Aber eventuell eine Grundlage?
Delphi-Quellcode:
procedure TForm1.DateTimePicker1Change(Sender: TObject);
begin
if (DateTimePicker1.Tag = 1) then
begin
(Sender As TDateTimePicker).Format := QuotedStr('Datum wählen');
end
else
begin
(Sender As TDateTimePicker).Format := ShortDateFormat;
end;
end;
procedure TForm1.DateTimePicker1CloseUp(Sender: TObject);
begin
(Sender As TDateTimePicker).Tag := 0;
DateTimePicker1Change(sender);
end;
procedure TForm1.DateTimePicker1KeyPress(Sender: TObject; var Key: char);
begin
if (Key = #27) then
begin
(Sender As TDateTimePicker).Tag := 1;
end;
if Key in ['0'..'9'] then
begin
(Sender As TDateTimePicker).Tag := 0;
end;
DateTimePicker1Change(sender);
end;
Stephan B.
"Lasst den Gänsen ihre Füßchen"