[Closed] ListView with icons
Has any one tried setting icons on the ActiveX list view control??
Basically all I really want to do is provide a list of icons that the user can select. Every time i try to set the list views icons properties with a empty list view (as it will populated dynamically), it throws an error “Cannot set the property .icons”
If i’m reading the documentation correctly. I should be able to add a image list control to the list view and when I add new items, I should set their icon value to the index value of the icon I want in the image list…
But I don’t seem to be able to get it to work.
Any help would be appricated
Cheers
Shane
Take a look at “How To … Develop a Scene Browser using TreeView ActiveX Control – Part Two”. I think the ImageList property of a TreeView is working like the Icons property of a ListView.
Hi ypuech!
Thanks for the heads up! I’ve already checkout that tut for the image list. Unfourtantly, the listview does not have a image list property.
From my limited investigations into it, the icons property seems to be read only…excuse me while i go smack my head against a brick wall
In fact, as I said you can assign a ImageLIst control to a ListView using its .Icons property. And for each LIstViewItem of the ListView you have to set the .Icon index integer referencing the desired icon in the ImageList.
This is how I had interrupted the docs. Having said that though, I stand (happly) corrected. I don’t know what I’ve done differently this morning, but it is no longer throwing an error.
I appriciate your persistence and assistance. Thank you
Cheers
Shane
ed: Actually, the one thing I can think off that might be different is the fact that I set the icon width and height properties of the image list. This might have helped, can’t really say without going back and testing it.
Make note, if you are in Max 9 or higher you are going to want to use .net instead of active X.
Because my client is using max 8 and to quite frank, the dot net functionality is ever so slightly more useful then the activex…given 3 hours or so of playing around with both…but that’s just my opinon
ed- Also, with dotnet, you are guaranteed of the api. Once you have dotnet installed, you can feel confident that certain components exist. With activeX, you can’t…usually because each component can be installed relatively separately…again, that’s my experience.
Yes I know, you do checks and all that, but if you are relying on certain component, it becomes alot more tricky.
.net is far better then active X. I have been using .net controls a whole lot as of late and I find them far better in many ways then activeX.