Entwickler-Ecke

Grafische Benutzeroberflächen (VCL & FireMonkey) - Textcursor von e1 zu e2 ?!


Big_Nuke - So 13.10.02 12:51
Titel: Textcursor von e1 zu e2 ?!
Öhhhm... :roll: ich brings ned fertig... ich will, das wenn ich im Edit2 mit ENTER bestätige, dass der Cursor(TextCursor) zu Edit 1 wechselt. ich hab schon das:

Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
procedure TForm1.Edit1KeyDown(Sender: TObject; var Key: Word;
  Shift: TShiftState);
begin
if key = VK_RETURN then begin
lines := lines + 1;
memo1.lines.add(edit2.text + ' <-- Englisch == Deutsch --> ' + edit1.text);
if lines > 30 then ScrollBox1.vertscrollbar.position := ScrollBox1.vertscrollbar.position + 13;
end;
end;
das memo ist in der scrollbox abr das tut eh nix zur sache...

bitte um Ergänzung!
THX!!


Christian S. - So 13.10.02 13:27

Hi!

Ich glaube, man könnte das so machen:


Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
procedure TForm1.Edit2KeyPress(Sender: TObject; var Key: Char);
begin
  iF Ord(key) = 13 then
  begin
    Form1.ActiveControl:=Edit1;
    edit1.sellength:=0;
  end;
end;


MfG,
Peter


Big_Nuke - So 13.10.02 15:31

THX!! das hat geklappt!