el codigo que uso para darle el foco al tdateedit con un enter es el siguiente
delphi
procedure TForm1.inicialKeyPress(Sender: TObject; var Key: Char); begin if Key = #13 then begin Key := #0; Perform(WM_NEXTDLGCTL, 0, 0); end end;
Escrito 25 junio 2012 - 11:10
procedure TForm1.inicialKeyPress(Sender: TObject; var Key: Char); begin if Key = #13 then begin Key := #0; Perform(WM_NEXTDLGCTL, 0, 0); end end;
Escrito 26 junio 2012 - 08:44
que hayamigos a ver quien puede echarme una mano tengo un tdateedit que al darle el foco esta toda la fecha seleccionada y tengo que irme a la primera posicion manualmente para empezar a escribir si no se borra lo demas mi pregunta es hay alguna forma de cuando se ponga el foco solo sea en la primera posicion de la fecha porque a veces nomas necesito cambiar dia y no mes ni año
el codigo que uso para darle el foco al tdateedit con un enter es el siguiente
delphi
procedure TForm1.inicialKeyPress(Sender: TObject; var Key: Char); begin if Key = #13 then begin Key := #0; Perform(WM_NEXTDLGCTL, 0, 0); end end;
Escrito 27 junio 2012 - 03:19
procedure TForm1.inicialKeyPress(Sender: TObject; var Key: Char); begin if Key = #13 then begin Perform(WM_NEXTDLGCTL, 0, 0); Key := VK_HOME; end end;