|
-
April 27th, 2001, 09:52 AM
#1
Listview control
Does anyone have source code or know of a link (to a sample project) which allows you on a form with two listviews to select from one listview (for example, a set of names) and either drag to the second listview on the form or use the arrows (>, >>,<,<< to select\deselect names and move from one listview to another.
I am sure this has been done thousands of time, and with current time contraints, don't really need to duplicate this code
Thanks is advance
R
-
April 27th, 2001, 01:50 PM
#2
Re: Listview control
Hi...
The following may or may not work as I am unable to test it right now but you could give it a try.
Dim NewListItem as ListItem
Dim ItemX as ListItem
for Each ItemX In ListView1.ListItems
set NewListItem = _
ListView2.ListItems.Add(,,ItemX.Text)
next ItemX
Not sure if that will work or even if it is what you're looking for...
actually while you're "trying things" :-) you could try this as well
set ListView2.ListItems = ListView1.ListItems
Later, I'll test things and see if those actually work. :-)
-
April 27th, 2001, 05:05 PM
#3
Re: Listview control
I just tested the code I gave you...
The fist example works... the second one does not...
Only I would do this in the for statement
Set NewListItem = ListView2.ListItems.Add(ItemX.Index, ItemX.Key, ItemX.Text, ItemX.Icon)
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
|