|
-
Nov 22nd, 2002, 04:17 PM
#1
Thread Starter
New Member
Subclassing Listview control
Hi,
I'm writing a project in VB6 and would like to add to the element Item As MSComctlLib.ListItem new properties and methods?
Is it possible?
My purpose is to associate the each ListItem some additional information.
Any help will be greatly appreciated.
-
Nov 22nd, 2002, 04:20 PM
#2
I don't think you can. But depending on what you are trying to accomplish, you could probably use each ListItem's Tag property to hold an object that contains the additional info. The Tag is a Variant, I think.
Just add/edit the extra info as you add/interact the listitems.
Laugh, and the world laughs with you. Cry, and you just water down your vodka.
Take credit, not responsibility
-
Nov 22nd, 2002, 05:19 PM
#3
Frenzied Member
if i am understanding the problem, you are using a standard listbox and you want to link every item in the list with other items,
the solution presented by MR. crptcblade is good if you want to link the full control with something else, but if you want to link each item in the list with other sub items , i think you should use another control called (listview) , Check it in msdn help to c if it fits your needs.
hope i could help
-
Nov 23rd, 2002, 04:52 AM
#4
Thread Starter
New Member
Re: Subclassing Listview control
Thanks. I think that the good solution is to use the Tag object of the ListItem object (of the Listview control).
So, can I also associate to the ListItem.Tag attribute a class so that I can set and get its properties and call its methods?
Thanks again.
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
|