Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Okay, I did a search for this, but had no luck whatsoever, so I'm just going to ask.

 

I want to have some sort of list (probably a listview control), to contain a list of "contacts", next to each contact I would like an image. Is there a way to do this with ListView or do I need to look towards a different control.

 

Example of what I'm looking for would be the "Buddy List" in either AIM or MSN Messenger.

 

Thanks!

If it works... don't worry, I'll fix it.
Posted

Well this is VB6 knowledge but here goes:

The ListView is just what you asked for.

 

Just don't forget toset the ListView.View Property to "Details".

 

Then you can give every listitem an icon and show additional information in the subitems.

.nerd
  • Leaders
Posted

Add a listview to your form, add an image list, set the listview to smallicon view and then select the imagelist as the smallicon property in listview properties, add an image to the imagelist, in this case it's got only 1 image and the index for that image is 0, then to add the text with that image next to it you do the following...

ListView1.Items.Add("Message", 0) '// 0 is the image index for that particular image in the imagelist , the "Message" obviously being your own text to add to the list.

hope this helps.

Posted
A buddy list would work from a treeview as well, you could also great groups, just remove the tree lines if you dont want them.

Phil Price�

Visual Studio .NET 2003 Enterprise Edition

Microsoft Student Partner 2004

Microsoft Redmond, EMEA Intern 2004

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...