List Box Selection
-
Hi, How do you select multi items in a listbox? I have a listbox with say the following values A, B, C, D, E, F I want to select and then display the items I selected e.g. C, E, F It has been a while since I done VB development and I am a wee bit rusty. Due to staff cutbacks. Thanks in advance.
-
Hi, How do you select multi items in a listbox? I have a listbox with say the following values A, B, C, D, E, F I want to select and then display the items I selected e.g. C, E, F It has been a while since I done VB development and I am a wee bit rusty. Due to staff cutbacks. Thanks in advance.
-
Hi, How do you select multi items in a listbox? I have a listbox with say the following values A, B, C, D, E, F I want to select and then display the items I selected e.g. C, E, F It has been a while since I done VB development and I am a wee bit rusty. Due to staff cutbacks. Thanks in advance.
the SelectionMode property needs your attention. :)
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 have the multi selection on. What I want to display is the actual items selected to be used in another procedure e.g. if b then etc Almost like assigning the selected items to a variable. Hope this makes sense???
You need to loop through and examine whether each item is selected. See the following link for more info. http://msdn.microsoft.com/en-us/library/system.windows.forms.listbox.getselected%28v=VS.90%29.aspx[^]
CQ de W5ALT
Walt Fair, Jr., P. E. Comport Computing Specializing in Technical Engineering Software
-
I have the multi selection on. What I want to display is the actual items selected to be used in another procedure e.g. if b then etc Almost like assigning the selected items to a variable. Hope this makes sense???
By reading up on the members of the ListBox class, you're bound to find what you need. If I'm guessing right from what you wrote, it could be this[^]. :)
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.