Autor Beitrag
Michael15
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 76

Win XP Professional
Delphi 2, 3, 7, 8
BeitragVerfasst: So 24.04.05 15:36 
Hallo Delphi-Fans

Mit welchem Befhel lässt sich eine gewünschte Zeile in einer listbox überschreiben???
Ich möchte in zwei Editfelder etwas eingeben und das soll dann in der Zeile in der lIstbox stehen. Kann mir jemand helfen??? Danke
Fabian W.
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 1766

Win 7
D7 PE
BeitragVerfasst: So 24.04.05 15:49 
ausblenden Delphi-Quelltext
1:
ListBox1.items[ZeiledieÜberschriebenwerdensoll] := Edit1.text					
WeBsPaCe
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 2322
Erhaltene Danke: 1

FireFox 3, Internet Explorer 6 SP1
D1, D3Prof, D6Pers, D7Pers+Indy, VisualStudio Express
BeitragVerfasst: So 24.04.05 15:51 
Kannst du das bitte ein wenig genauer erklären, was du möchtest? Danke! :D

ausblenden Delphi-Quelltext
1:
ListBox1.Items[4] := Edit1.Text;					

Ist das das, was du möchtest?
Michael15 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 76

Win XP Professional
Delphi 2, 3, 7, 8
BeitragVerfasst: So 24.04.05 15:52 
was ist denn wenn ich vorher ne zeile aus der Listbox ins edit einlesen lasse, und sie dann verändert wieder an eine gewünschte stelle in der listbox einfügen will???
Was muss ich da schreiben
Fabian W.
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 1766

Win 7
D7 PE
BeitragVerfasst: So 24.04.05 15:54 
Edit1.text := ListBox1.items[x];
Fabian W.
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 1766

Win 7
D7 PE
BeitragVerfasst: So 24.04.05 15:55 
Bitte drücke dich etwas genauer aus, ZB wo deine Werte für dir Zeile oder Text herkommen...
Michael15 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 76

Win XP Professional
Delphi 2, 3, 7, 8
BeitragVerfasst: So 24.04.05 15:55 
und wofür steht dann dort das x???
Fabian W.
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 1766

Win 7
D7 PE
BeitragVerfasst: So 24.04.05 15:55 
Das x Symbolisiert zb die Nummer 0 für die erste Zweile in der Box
Fabian W.
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 1766

Win 7
D7 PE
BeitragVerfasst: So 24.04.05 15:58 
Du musst immer bedenken dass delphi bei 0 anfängt zu zählen. Steht also eien 1 in der Klammer ist die zweite Zeile gemeint
Michael15 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 76

Win XP Professional
Delphi 2, 3, 7, 8
BeitragVerfasst: So 24.04.05 15:59 
sagen wir mal in der listbox steht:

1.Zeile: Hallo Karl
2.Zeile: Hallo Michael
3.Zeile: Hallo Robert

Num muss die Zeile 2 Ins editfeld.
Dann ändere ich sie um in Hallo Michaela.
Nun muss sie wenn man auf einen button drückt wieder an die selbe stelle und das Hallo Michael soll da nicht mehr stehen
Fabian W.
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 1766

Win 7
D7 PE
BeitragVerfasst: So 24.04.05 16:02 
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
edit1.text := ListBox1.items[1];
Edit1.text := 'Hallo Michaela';
Listbox1.items[1] := Edit1.text;


Oder

ListBox1.ittems[1] := 'haloo Michaela'
Michael15 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 76

Win XP Professional
Delphi 2, 3, 7, 8
BeitragVerfasst: So 24.04.05 16:04 
ich möchte das zur Laufzeit machen.
Díe Zeile soll im Edit erscheinen und
dann soll sie nach der Änderung (mit einem Buttonclick) wieder in die Listbox an die selbe stelle.
Fabian W.
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 1766

Win 7
D7 PE
BeitragVerfasst: So 24.04.05 16:06 
Dann benutze die ereignisse onshow deienr Form und on Click deines Buttons. Weise die oben genannten Befehlszeilen diesen erreignissen zu.
Michael15 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 76

Win XP Professional
Delphi 2, 3, 7, 8
BeitragVerfasst: So 24.04.05 16:07 
das verstehe ich nicht
Fabian W.
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 1766

Win 7
D7 PE
BeitragVerfasst: So 24.04.05 16:07 
So wei ich das jetzt sehe hats du keinerlei Grundkenntnisse?
Ixch würde dir empfehlen mal ein Buch zu kaufen. Nicht das das böse gemeint ist aber das ist grundwissen, wei die Addition in der Mathematik.
WeBsPaCe
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 2322
Erhaltene Danke: 1

FireFox 3, Internet Explorer 6 SP1
D1, D3Prof, D6Pers, D7Pers+Indy, VisualStudio Express
BeitragVerfasst: So 24.04.05 16:09 
Schau dir mal das angehängte Projekt an. ;)
Einloggen, um Attachments anzusehen!
Fabian W.
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 1766

Win 7
D7 PE
BeitragVerfasst: So 24.04.05 16:09 
Ich schreibe dir das Prog und gebe dir dann den Code. Warte bitte bis heute abend falls dir niemand anders hilf, da ich jezt mal kurz weg muss vom PC...

EDIT: ZU spät...