|
-
Jul 16th, 2000, 05:27 AM
#1
Thread Starter
Hyperactive Member
I have two listviews on two different forms of the same program, and I want them to contain the same data. How do I get the data from frmMain.ListView1 to frmEdit.ListView1?
bob
-
Jul 16th, 2000, 05:35 AM
#2
Lively Member
do you see the forms both at the same time or do you show one and unload or hide the other
if at first you don't succeed, drink the rest of the bottle and loop to the same place tomorrow
-
Jul 16th, 2000, 10:54 PM
#3
Thread Starter
Hyperactive Member
Never mind. I got it. And both are visible, though it doesn't matter. Here's what I did:
Code:
For X = 1 To Players(0).ListItems.Count
Set Plad = frmMakeTeam.PlayersEdit.ListItems.Add(X, , Players(0).ListItems(X).Text)
Plad.SubItems(1) = Players(0).ListItems(X).SubItems(1)
Plad.SubItems(2) = Players(0).ListItems(X).SubItems(2)
Next X
where Players(0) is the original listview, frmMakeTeam is the second form, and PlayersEdit is the copied listview. I had the code on form_load of the copied form, adjusted a little, but it didn't work, so I tried putting it in the main original, and it did work.
Thanks though.
bob
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|