|
-
Sep 7th, 2003, 05:52 PM
#1
Thread Starter
Hyperactive Member
loading image instead of text in listview - C# *resolved*
im wanting to load an image (thats 50x50), instead of a string, into a listview column (not the header)
not ness. the first column, but any.
ive tried using Bitmap.FromFile, but i get an error (cant convert the image to a string)
how, if possible, would one accomplish this?
Last edited by Colonel Klink; Sep 8th, 2003 at 10:33 PM.
-
Sep 8th, 2003, 01:54 AM
#2
yay gay
i think it will be very very hard as the listview doesnt allow each item to be drawn by itself as the combobox/listbox allow..so only maybe with a lot of subclassing
\m/  \m/
-
Sep 8th, 2003, 09:16 AM
#3
Thread Starter
Hyperactive Member
damn 
how about a listbox then?
-
Sep 8th, 2003, 12:47 PM
#4
yay gay
could u explain what u really wanna do plz so it might be easier to help?
\m/  \m/
-
Sep 8th, 2003, 02:03 PM
#5
-
Sep 8th, 2003, 03:17 PM
#6
Thread Starter
Hyperactive Member
thats the one Pirate 
except an image thats 50x50 or 100x100
how would i do this?
btw... its also gotta have text with it in other columns
Last edited by Colonel Klink; Sep 8th, 2003 at 03:24 PM.
-
Sep 8th, 2003, 03:26 PM
#7
Sleep mode
Easy . Add your images to ImageList , set Width and Height to whatever (50X50 or 100X100) . Bind it to the listview(3 steps I believe) StateImageList , SmallImageList and LargeImageList all = the imageList control. Add items , from there you can set imageindex to be shown in the listview .
-
Sep 8th, 2003, 03:38 PM
#8
Sleep mode
In the items collection of the listview, add set Text property to each item in the collection . I've not tried that but it sounds obvious .
-
Sep 8th, 2003, 04:43 PM
#9
Thread Starter
Hyperactive Member
oh ok... i was under the impression that i would need to do some subclassing to do an image other than 16x16 or whatever... thanks
-
Sep 9th, 2003, 10:47 AM
#10
Sleep mode
I think PT Exorcist meant combobox or listbox subclassing to hold these images . Right PT Exorcist ?
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
|