hmm..
The thing is. I have a class lets say
clsGraphicObject
and a collection class
colGraphicOjbect
inherits collectionbase
which has a list of clsGraphicObjects
I want to set listbox data source to this colGraphicObject's Items,
but also the result is not a string, but in clsGraphicObject, there is a
picture property that is a bitmap--that is what I want to display in the
listbox.
Will this still work?
Shane
"Ken Tucker [MVP]" <vb***@bellsouth.net> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
Hi,
Try setting the displaymember in addition to the datasource. Remember
the displaymember can be any property in the class held in the
collection.
Ken
-----------
"SStory" <Th*******@TAKEOUTTHISSPAMBUSTERsofthome.net> wrote in message
news:eR**************@TK2MSFTNGP11.phx.gbl: For an owner drawn list box,
I have a collection that represents some graphics objects in my app.
I inherited the collection class from collectionbase.
It would be nice to somehow just set the lstbox.datasource=mycollection
and have it work, but this seemed to never work so I just run through my
collection and popualate the list.
This is a real waste because the collection contains classes that have
one
property that is a bitmap. There won't be many of them but still this
is
duplicating memory.
Anyone know a way to make a collection class that works normally and
also
with a listbox?
Remember I owner draw each item.
Thanks,
Shane
--
Outgoing mail is certified Virus Free.
Checked by AVG Anti-Virus (http://www.grisoft.com).
Version: 7.0.230 / Virus Database: 263.3.3 - Release Date: 6/18/2004