CListBox::SetItemData equivalent?
-
Does SetItemData put hidden information in ? I don't recall seeing anything similar to that. I know for items that are visible you need to create a new instance of an item or subitem and then pass it in, but I don't think it has a data field. Christian We're just observing the seasonal migration from VB to VC. Most of these birds will be killed by predators or will die of hunger. Only the best will survive - Tomasz Sowinski 29-07-2002 ( on the number of newbie posters in the VC forum )
Blast!!! Say I have a listbox with the following stuff apple orange grapes orange banana apple Notice how apple and orange appear twice. Now to internally differentiate these items [because they are the textual casts of a more complex actual object] I'd need to associate an id with each. apple [ap1] orange [or1] grapes [grp] orange [or45] banana [bnna] apple [ap6] See? How do I do that??? Regards Nish p.s. The intention is this. If the guy has selected an item that appears multiple times, I should be able to get the id associated with it!
Author of the romantic comedy Summer Love and Some more Cricket [New Win] Review by Shog9 Click here for review[NW]
-
Blast!!! Say I have a listbox with the following stuff apple orange grapes orange banana apple Notice how apple and orange appear twice. Now to internally differentiate these items [because they are the textual casts of a more complex actual object] I'd need to associate an id with each. apple [ap1] orange [or1] grapes [grp] orange [or45] banana [bnna] apple [ap6] See? How do I do that??? Regards Nish p.s. The intention is this. If the guy has selected an item that appears multiple times, I should be able to get the id associated with it!
Author of the romantic comedy Summer Love and Some more Cricket [New Win] Review by Shog9 Click here for review[NW]
-
Dude, what's with the large fonts? Don't tell me your vision is going now...
---
Shog9 If I could sleep forever, I could forget about everything...
Shog9 wrote: Dude, what's with the large fonts? Don't tell me your vision is going now... Alright, alright! I am not allowed to feed the lions, I am not allowed to sing aloud. Other people get to use big fonts, I never get to do anything. I am sulking. Hey, I tho I tho a puthy cath...... I deedh, I deedh tho a puthy cath... [Sigh] This list box issue is frustrating me Shog :-(
Author of the romantic comedy Summer Love and Some more Cricket [New Win] Review by Shog9 Click here for review[NW]
-
Shog9 wrote: Dude, what's with the large fonts? Don't tell me your vision is going now... Alright, alright! I am not allowed to feed the lions, I am not allowed to sing aloud. Other people get to use big fonts, I never get to do anything. I am sulking. Hey, I tho I tho a puthy cath...... I deedh, I deedh tho a puthy cath... [Sigh] This list box issue is frustrating me Shog :-(
Author of the romantic comedy Summer Love and Some more Cricket [New Win] Review by Shog9 Click here for review[NW]
Hey, it's ok by me if you want to feed the lions. Nishant S wrote: Hey, I tho I tho a puthy cath...... I deedh, I deedh tho a puthy cath What?!? (w0t) *you're* Tweety now? Nishant S wrote: This list box issue is frustrating me Admittedly, i know nothing about anything, but - can't you just create a class containing two data items, add a toString member, & be done with it? Should still be fairly concise i should think. Or am i missing the point.
---
Shog9 If I could sleep forever, I could forget about everything...
-
Hey, it's ok by me if you want to feed the lions. Nishant S wrote: Hey, I tho I tho a puthy cath...... I deedh, I deedh tho a puthy cath What?!? (w0t) *you're* Tweety now? Nishant S wrote: This list box issue is frustrating me Admittedly, i know nothing about anything, but - can't you just create a class containing two data items, add a toString member, & be done with it? Should still be fairly concise i should think. Or am i missing the point.
---
Shog9 If I could sleep forever, I could forget about everything...
Shog9 wrote: Admittedly, i know nothing about anything, but - can't you just create a class containing two data items, add a toString member, & be done with it? Should still be fairly concise i should think. Or am i missing the point. Shog!!!! :omg: Has anyone ever told you that you are a miraculous genius whose existence on this planet is truly an unbelievable phenomenon of astonishing proportions? Nish!! p.s. It bloody damn well worked!!! :eek:
Author of the romantic comedy Summer Love and Some more Cricket [New Win] Review by Shog9 Click here for review[NW]
-
Shog9 wrote: Admittedly, i know nothing about anything, but - can't you just create a class containing two data items, add a toString member, & be done with it? Should still be fairly concise i should think. Or am i missing the point. Shog!!!! :omg: Has anyone ever told you that you are a miraculous genius whose existence on this planet is truly an unbelievable phenomenon of astonishing proportions? Nish!! p.s. It bloody damn well worked!!! :eek:
Author of the romantic comedy Summer Love and Some more Cricket [New Win] Review by Shog9 Click here for review[NW]
I should see if i can't get some money out of MS for a testimonial: "Has anyone ever told you that you are a miraculous genius whose existence on this planet is truly an unbelievable phenomenon of astonishing proportions? Buy MSDN, and hear it daily!" Nishant S wrote: It bloody damn well worked!!! Kewl :)
---
Shog9 If I could sleep forever, I could forget about everything...
-
Blast!!! Say I have a listbox with the following stuff apple orange grapes orange banana apple Notice how apple and orange appear twice. Now to internally differentiate these items [because they are the textual casts of a more complex actual object] I'd need to associate an id with each. apple [ap1] orange [or1] grapes [grp] orange [or45] banana [bnna] apple [ap6] See? How do I do that??? Regards Nish p.s. The intention is this. If the guy has selected an item that appears multiple times, I should be able to get the id associated with it!
Author of the romantic comedy Summer Love and Some more Cricket [New Win] Review by Shog9 Click here for review[NW]
I dunno, given that the Win32 boxes do it, you'd think it was possible. If not, could you put the data in another column and hide it, by forcing it to be 0 pixels wide ? I'll be home in two hours, if there's no other answer by then, I can check in Petzold. Christian We're just observing the seasonal migration from VB to VC. Most of these birds will be killed by predators or will die of hunger. Only the best will survive - Tomasz Sowinski 29-07-2002 ( on the number of newbie posters in the VC forum )
-
I should see if i can't get some money out of MS for a testimonial: "Has anyone ever told you that you are a miraculous genius whose existence on this planet is truly an unbelievable phenomenon of astonishing proportions? Buy MSDN, and hear it daily!" Nishant S wrote: It bloody damn well worked!!! Kewl :)
---
Shog9 If I could sleep forever, I could forget about everything...
I am guessing that you do eat a lot of fish, eh Shog? Nothing else could explain this :-) By the way I have added the missing "are" in my post, but by the time I had done that you had already replied and quoted the sentence. I usually never correct typo errors, this time I did it, just in case MSDN or Dundas decides to use you as their model ;-) Nish
Author of the romantic comedy Summer Love and Some more Cricket [New Win] Review by Shog9 Click here for review[NW]
-
I am guessing that you do eat a lot of fish, eh Shog? Nothing else could explain this :-) By the way I have added the missing "are" in my post, but by the time I had done that you had already replied and quoted the sentence. I usually never correct typo errors, this time I did it, just in case MSDN or Dundas decides to use you as their model ;-) Nish
Author of the romantic comedy Summer Love and Some more Cricket [New Win] Review by Shog9 Click here for review[NW]
Nishant S wrote: I am guessing that you do eat a lot of fish, eh Shog? Smoked salmon count? Nishant S wrote: I usually never correct typo errors, this time I did it, just in case MSDN or Dundas decides to use you as their model Hey, if i'd get to meet that summer bikini model i'd go for it ;)
---
Shog9 If I could sleep forever, I could forget about everything...
-
What's the .NET equivalent of
CListBox::SetItemData
? I didn't find anything analogous in theListBox
class :-( Nish
Author of the romantic comedy Summer Love and Some more Cricket [New Win] Review by Shog9 Click here for review[NW]
The ListBox control can contain any Object derived class, not simply strings. To display a value, ListBox calls the Object::ToString(), which you can override on your own types. This means that you can insert items that contain more than 32bits of "Item Data". Note for ListViews, use the ListItem "Tag" property to store user-information (of any type). This posting is provided “AS IS” with no warranties, and confers no rights. You assume all risk for your use. © 2001 Microsoft Corporation. All rights reserved.