Return a specified item from a list box..
-
Hi I am looking for a way to find an item in a list box by its index number, then copy it to a variable any ideas. Thanks
-
Hi I am looking for a way to find an item in a list box by its index number, then copy it to a variable any ideas. Thanks
Have you tried using it's index number at all?
ListBox lb = new ListBox(); lb.Items.Add("Hello"); lb.Items.Add("Goodbye"); string s = lb.Items\[1\] as string;
Real men don't use instructions. They are only the manufacturers opinion on how to put the thing together.
-
Have you tried using it's index number at all?
ListBox lb = new ListBox(); lb.Items.Add("Hello"); lb.Items.Add("Goodbye"); string s = lb.Items\[1\] as string;
Real men don't use instructions. They are only the manufacturers opinion on how to put the thing together.
I think you meant
lb.Items[0]
. :) /raviMy new year resolution: 2048 x 1536 Home | Articles | My .NET bits | Freeware ravib(at)ravib(dot)com
-
I think you meant
lb.Items[0]
. :) /raviMy new year resolution: 2048 x 1536 Home | Articles | My .NET bits | Freeware ravib(at)ravib(dot)com
Maybe Griff did mean [1] for "Goodbye", as in "Goodbye. Now go look things up in MSDN and/or learn to use Google and stop bothering everyone with elementary questions like that." :)
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, and improve readability.
-
Maybe Griff did mean [1] for "Goodbye", as in "Goodbye. Now go look things up in MSDN and/or learn to use Google and stop bothering everyone with elementary questions like that." :)
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, and improve readability.
Heh. But what's obvious to some may not be obvious to others. Isn't that what learning's all about? :) /ravi
My new year resolution: 2048 x 1536 Home | Articles | My .NET bits | Freeware ravib(at)ravib(dot)com
-
Heh. But what's obvious to some may not be obvious to others. Isn't that what learning's all about? :) /ravi
My new year resolution: 2048 x 1536 Home | Articles | My .NET bits | Freeware ravib(at)ravib(dot)com
Sure, however making some effort yourself can be very rewarding and typically yields more insight. The OP has gotten answers already he clearly is not following up by reading the doc at all. :)
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, and improve readability.
-
Maybe Griff did mean [1] for "Goodbye", as in "Goodbye. Now go look things up in MSDN and/or learn to use Google and stop bothering everyone with elementary questions like that." :)
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, and improve readability.
And there was me trying to be subtle... :laugh:
Real men don't use instructions. They are only the manufacturers opinion on how to put the thing together.
-
And there was me trying to be subtle... :laugh:
Real men don't use instructions. They are only the manufacturers opinion on how to put the thing together.
Too much so, I'm afraid. I felt the need to clarify a little. :)
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, and improve readability.
-
Too much so, I'm afraid. I felt the need to clarify a little. :)
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, and improve readability.
I don't often get told I'm too subtle! Normally it's quite the reverse. It'll be a pipe and carpet slippers next, I'm afraid... :sigh:
Real men don't use instructions. They are only the manufacturers opinion on how to put the thing together.
-
I don't often get told I'm too subtle! Normally it's quite the reverse. It'll be a pipe and carpet slippers next, I'm afraid... :sigh:
Real men don't use instructions. They are only the manufacturers opinion on how to put the thing together.
OriginalGriff wrote:
It'll be a pipe and carpet slippers next
Now you've lost me, you really need to start formulating more clearly. :laugh:
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, and improve readability.