I'm going to be using a ListBox in my managed C++ application, and have a
question. Why are the Items you Add to a ListBox in the form of generic
Object*'s? I believe a ListBox displays a table of selectable options via
multiple lines (or columns) of TEXT, so why doesn't Add merely take a
String* ? How does it know what to display (i.e., the text of each Item
listing) with a generic Object* (or do all Object's have some Text property
ListBox knows to display to represent it)? Put more to the point, if I Add
an Item which ISN'T a String*, what does the ListBox display?
Thanks in advance! : )
[==Peteroid==]
mosimu - 01 Mar 2005 00:59 GMT
You should look up DisplayMember and ValueMember, which are listbox
properties. I have never used it myself but you can use that to control what
is displayed in the listbox.
mosimu
> I'm going to be using a ListBox in my managed C++ application, and have a
> question. Why are the Items you Add to a ListBox in the form of generic
[quoted text clipped - 8 lines]
>
> [==Peteroid==]
Peteroid - 01 Mar 2005 22:21 GMT
Thanks, I will :)
[==Peteroid==]
> You should look up DisplayMember and ValueMember, which are listbox
> properties. I have never used it myself but you can use that to control
[quoted text clipped - 17 lines]
>>
>> [==Peteroid==]