Autor Beitrag
SMARTY1
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 22



BeitragVerfasst: Sa 29.12.07 14:17 
Hallo
Ich möchte den Inhalt von einer Listbox auf meinem Hauptformular in eine Listbox auf einem anderen Formular übernehmen! Kann mir jemand weiterhelfen?
MDX
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 595
Erhaltene Danke: 4

Windows 8.1, Linux Debian 8, Android Lollipop
Delphi, PHP, Java (Android)
BeitragVerfasst: Sa 29.12.07 14:36 
Habe gehofft das geht mit

ausblenden Delphi-Quelltext
1:
form1.ListBox1.Items:=form2.ListBox1.Items;					


Funktioniert nur nicht ganz...

Probier mal das:

ausblenden Delphi-Quelltext
1:
2:
3:
form1.ListBox1.SelectAll;
form1.ListBox1.CopySelection(listbox1);
form2.ListBox1.Items:=form1.listbox1.Items;


David
jakobwenzel
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1889
Erhaltene Danke: 1

XP home, ubuntu
BDS 2006 Prof
BeitragVerfasst: Sa 29.12.07 15:29 
ausblenden Delphi-Quelltext
1:
ListBox2.Items.Assign(ListBox1.Items)					

_________________
I thought what I'd do was, I'd pretend I was one of those deaf-mutes.
MDX
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 595
Erhaltene Danke: 4

Windows 8.1, Linux Debian 8, Android Lollipop
Delphi, PHP, Java (Android)
BeitragVerfasst: Sa 29.12.07 16:20 
user profile iconjakobwenzel hat folgendes geschrieben:
ausblenden Delphi-Quelltext
1:
ListBox2.Items.Assign(ListBox1.Items)					


In seinem Fall müsste das eher so sein:
ausblenden Delphi-Quelltext
1:
Form1.ListBox1.Items.Assign(Form2.ListBox1.Items)					


(Obwohl das bei mir nicht funktioniert - Komisch :? :? :? )
jakobwenzel
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1889
Erhaltene Danke: 1

XP home, ubuntu
BDS 2006 Prof
BeitragVerfasst: Sa 29.12.07 16:27 
Auf die Namen kommts doch da erstmal gar nicht an, dazu sollte er auch selbst fähig sein. :wink:

Kommt bei dir irgendne Fehlermeldung?
Funktionieren tuts auf jeden Fall, so steht das in zich Programmen von mir. :wink:

_________________
I thought what I'd do was, I'd pretend I was one of those deaf-mutes.