How to add icons in the Listview control

K

kvenku

Hi,

I need to add icons in the listview. How do to this. Can any one hel
me out.

Also i need to place icons in Treeview control. I hope that the cod
should be more or less same for both controls.

I would appreciate if you send me some examples


Regards

Venkatesh
 
K

keepitcool

1st thing:

include an ImageList in your app.
populate the imagelist manually or with code using stdole.

(the imagelist will hold all icons, but in 1 size only!)

now you can simply assign icons from the imagelist to your treeview.
(by name/index etc)

the imagelist itself shows as a block in designmode.
but is invisible at runtime.

now that you know what to look for..
search google on imagelist... plenty of examples..



keepITcool

< email : keepitcool chello nl (with @ and .) >
< homepage: http://members.chello.nl/keepitcool >
 
R

ross

Yo Venkatesh.

As far a i know viwe tree gets it images from a Imagelist control of
the same form. Each node can choose a image from the control.

There must be loads of stuff on the web about this, google for VB
controls!

Good Luck
Ross.
 
K

kvenku

Hi,
Thanks for the reply but you know that i added the images in th
Imagelist. Then when i open the property page(General tab) of Treevie
i could not find any imagelist in the Imagelist combo box. Even thou
have imagelist in the form.

Thats why i could not do any thing.

I don't see any properties in Listview to assign the imagelist contro
to listview as in Treeview. So how do i place icons in the listview.

Please do reply me with samples. I have acess to excelforum.co
alone..I could not browse any other internet site like google.com

Regards
venkatesh
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top