Home > Archive > Visual Basic Controls > February 2005 > Listview with no imagelist?
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Listview with no imagelist?
|
|
| George 2005-02-03, 9:00 pm |
| Hello,
Is there a way to display icons in a listview with out using a imagelist?
Thanks,
George
| |
|
|
"George" <George@discussions.microsoft.com> wrote in message
news:2B9DB4C8-45B0-4AE3-B610-E11C7C3ADFB4@microsoft.com...
> Hello,
>
> Is there a way to display icons in a listview with out using a imagelist?
Not to my knowledge. What's wrong with using an ImageList?
--
Mike
Microsoft MVP Visual Basic
| |
| Jeff Johnson [MVP: VB] 2005-02-03, 9:00 pm |
|
"George" <George@discussions.microsoft.com> wrote in message
news:2B9DB4C8-45B0-4AE3-B610-E11C7C3ADFB4@microsoft.com...
> Is there a way to display icons in a listview with out using a imagelist?
Well, I supposed you could subclass the list view and draw the items
yourself, but why go to all that trouble?
| |
| George 2005-02-04, 4:00 pm |
| OK...thanks.
I have an inventory system in the works. When a location is being looked
at, I wanted to show thumbnail images of the items. I keep the paths and
names of the image files in a table in an Access database.
I was having trouble figuring out how to clear and add the images to a
imagelist and then ading and showing them in a listview.
George
"Jeff Johnson [MVP: VB]" wrote:
>
> "George" <George@discussions.microsoft.com> wrote in message
> news:2B9DB4C8-45B0-4AE3-B610-E11C7C3ADFB4@microsoft.com...
>
>
> Well, I supposed you could subclass the list view and draw the items
> yourself, but why go to all that trouble?
>
>
>
| |
| Randy Birch 2005-02-08, 9:02 pm |
| 1) don't bind the imagelist to a listview at design time
2) to unbind it set the listview smallicons or icons property to nothing
3) you can clear the imagelist now
4) before rebinding to the listview, the imagelist must contain at least 1
image. The size of the remaining icons is determined by the size of the
first item added. I find it handy to keep a dummy image in a hidden
picturebox, and use that as the first image to allow rebinding.
5) rebind to the listview by assigning the smallicons or icons property to
the imagelist.
--
Randy Birch
MS MVP Visual Basic
http://vbnet.mvps.org/
"George" <George@discussions.microsoft.com> wrote in message
news:A4EBAD92-D6AF-4BC3-8007-901A3D2C24A8@microsoft.com...
: OK...thanks.
:
: I have an inventory system in the works. When a location is being looked
: at, I wanted to show thumbnail images of the items. I keep the paths and
: names of the image files in a table in an Access database.
:
: I was having trouble figuring out how to clear and add the images to a
: imagelist and then ading and showing them in a listview.
:
: George
:
: "Jeff Johnson [MVP: VB]" wrote:
:
: >
: > "George" <George@discussions.microsoft.com> wrote in message
: > news:2B9DB4C8-45B0-4AE3-B610-E11C7C3ADFB4@microsoft.com...
: >
: > > Is there a way to display icons in a listview with out using a
imagelist?
: >
: > Well, I supposed you could subclass the list view and draw the items
: > yourself, but why go to all that trouble?
: >
: >
: >
|
|
|
|
|