Colocar o cursor no final
Caros amigos quero que o cursor se posicione no final ao receber o foco, sei que é alguma coisa do tipo ´mskhistor1.selstart := length (mskhistor1.text);´ mas já tentei colocar por aqui mas não consigo:
procedure TFrmLancRed.MskCodHistExit(Sender: TObject);
begin
if AllTrim(MskCodhist.Text) <> ´´ then
begin
TblHistor.IndexName := ´´;
MskCodhist.Text := Zeros(MskCodhist.Text);
If TblHistor.FindKey([MskCodhist.Text])= True Then
begin
[color=red](obs: creio que o segredo esta aqui)
IF STATUS = ´I´ then
MskHistor1.Text := TblHistorDescricao.Text[/color]
else
if Cod_ant <> mskcodHist.Text then
MskHistor1.Text := TblHistorDescricao.Text;
end
else
begin
Mensagem(´Código de Histórico Não Cadastrado´);
MskCodHist.Clear;
MskCodHist.Setfocus;
end;
end;
end;
Gostaria de uma luz, por favor
Abraços
EVA
procedure TFrmLancRed.MskCodHistExit(Sender: TObject);
begin
if AllTrim(MskCodhist.Text) <> ´´ then
begin
TblHistor.IndexName := ´´;
MskCodhist.Text := Zeros(MskCodhist.Text);
If TblHistor.FindKey([MskCodhist.Text])= True Then
begin
[color=red](obs: creio que o segredo esta aqui)
IF STATUS = ´I´ then
MskHistor1.Text := TblHistorDescricao.Text[/color]
else
if Cod_ant <> mskcodHist.Text then
MskHistor1.Text := TblHistorDescricao.Text;
end
else
begin
Mensagem(´Código de Histórico Não Cadastrado´);
MskCodHist.Clear;
MskCodHist.Setfocus;
end;
end;
end;
Gostaria de uma luz, por favor
Abraços
EVA
Eva
Curtidas 0
Respostas
Eva
25/10/2005
E ai pessoal, nada!!!!
GOSTEI 0