Autor Beitrag
Hasche
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 43



BeitragVerfasst: Do 13.12.07 11:42 
Die Übersetzung funktioniert nur mit der 1. Vokabel in der Listbox, die restlichen werden nicht übersetzt :(

edit1 = gesuchte Vokabel
ListBox1 = deutsche Vokabelliste
edit2 = Übersetzung von edit1
ListBox2 = englische Vokabelliste

Deutsch->Englisch
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
procedure TForm1.Button1Click(Sender: TObject);
begin
If edit1.Text=ListBox1.Items[b] then
edit2.Text:=ListBox2.Items[b];
end;

Englisch->Deutsch
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
procedure TForm1.Button5Click(Sender: TObject);
begin
If edit1.Text=ListBox2.Items[b] then
   edit2.text := ListBox1.Items[b]
end;
Tilman
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 1405
Erhaltene Danke: 51

Win 7, Android
Turbo Delphi, Eclipse
BeitragVerfasst: Do 13.12.07 11:58 
Du must die ganze Listbox durchgehen

ausblenden Delphi-Quelltext
1:
2:
3:
for b := 0 to listbox1.items.count - 1 do
  if edit1.Text=ListBox1.Items[b] then
     edit2.Text:=ListBox2.Items[b];


(Aus dem Kopf geschrieben ohne Delphi)

_________________
Bringe einen Menschen zum grübeln, dann kannst du heimlich seinen Reis essen.
(Koreanisches Sprichwort)
Hasche Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 43



BeitragVerfasst: Do 13.12.07 12:02 
I give a big hand for you :)
Danke Danke Danke Danke, funzt.. auch mit Delphi :P