Hallo Leute !
Ich möchte gern das er mir die Worte aus Rich Edit in die Listbox schreibt aber erst, wenn Edit1 > als 1 Zeichen ist aber leider funktioniert das nicht so Recht.
Hat einer ne Ahnung woran das liegen könnte.
Delphi-Quelltext
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14:
| procedure TForm1.RichEdit1KeyDown(Sender: TObject; var Key: Word; Shift: TShiftState); begin if Edit1.Text >' ' then begin if Key = VK_SPACE then Listbox1.Items.Add(Edit1.Text); if Key = VK_SPACE then Edit1.Clear;
if Key = VK_RETURN then Listbox1.Items.Add(Edit1.Text); if Key = VK_RETURN then Edit1.Clear;
if Key = VK_BACK then Edit1.Text := Copy(Edit1.Text, 1, Length(edit1.Text) - 1); end; end; |
Hat sich erledigt habs hinbekommen (length(Edit1.Text) < 2) !