PC Review


Reply
Thread Tools Rate Thread

Adding images to a listview

 
 
CaptainCaveman
Guest
Posts: n/a
 
      24th Apr 2009
Hi,

I'm trying to display a picture in my first list view column.

I've added the imagelist to my control as both a small image list and a
large image list, but the image is only drawn when it is assgned to the
small image list. This is no use to me as the image needs to be of a larger
size (thumbnail) but also requires additional information in subsequent
columns.

Does anyone know how to display a larger picture in column 1, then be able
to add data to subsequent columns for that ListViewItem?

TIA

CC


 
Reply With Quote
 
 
 
 
Jeff Johnson
Guest
Posts: n/a
 
      28th Apr 2009
"CaptainCaveman" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...

> I'm trying to display a picture in my first list view column.
>
> I've added the imagelist to my control as both a small image list and a
> large image list, but the image is only drawn when it is assgned to the
> small image list. This is no use to me as the image needs to be of a
> larger size (thumbnail) but also requires additional information in
> subsequent columns.
>
> Does anyone know how to display a larger picture in column 1, then be able
> to add data to subsequent columns for that ListViewItem?


When a list view is in Report (Details) view, it uses the small image list
as its source for images, period. The only way to do what you want is to go
the Owner Draw route. I recommend you look into it as it isn't really very
difficult to do. I used it once to draw a progress bar in a column. As long
as you aren't terrified by the concept of the Graphics class and maybe a
little bit of simple math (I'm talking addition and subtraction here, not
trig or anything), you'll be fine.


 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Adding images to a listview Markus.Humm Microsoft Dot NET Compact Framework 11 5th Jan 2007 12:01 PM
(Query) Adding Items(not Images) to a ListView Control. baderdinni65 Microsoft Dot NET Framework 1 1st Mar 2005 10:56 AM
Adding Images to ListView Subitems Mark Doggett Microsoft C# .NET 1 12th Nov 2003 08:23 AM
Adding images (bitmap) to any colum of a listview Ivan Figueredo Microsoft C# .NET 2 10th Sep 2003 10:35 PM
RE: ListView - images disappear after coming back from another form with a ListView Armin Sadeghi [MSFT] Microsoft Dot NET Compact Framework 0 5th Sep 2003 11:41 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:32 AM.