|
-
Jan 24th, 2006, 09:52 PM
#1
Thread Starter
New Member
[RESOLVED] select statements in vb.net
I need to add a select box on my vbform. Unfortunatly I can not see anything that seems to match this. The list box seems to be the closest tool but I want the client to only be able to select 1 choice at a time. I also only want 1 value to be able to be viewed at a time but also be able to scroll down to see other choices.
What would be my best tool to use for this?
-
Jan 24th, 2006, 10:17 PM
#2
Re: select statements in vb.net
The ListBox can do all that. The SelectionMode property controls how many and how the user can select items and you can simply adjust the height to display a single item. Having said that, you actually probably want a ComboBox. It looks like a TextBox but with an arrow to drop down a list of options. The user can type into the top section by default, but you can change that by setting the DropDownStyle property to DropDownList.
-
Jan 25th, 2006, 02:03 AM
#3
Thread Starter
New Member
Re: select statements in vb.net
In doing this how do I eliminate the horazontal scrollbars? I have set that value in the list boxes properties to false but it still shows up. How do I eliminate the horazontal scroll bars but still be able to keep the vertical ones.
-
Jan 25th, 2006, 02:13 AM
#4
Re: select statements in vb.net
-
Jan 25th, 2006, 02:17 AM
#5
Re: select statements in vb.net
Tested in both 2003 and 2005, and as long as the horizontalscrollbar property is set to false, you do not get the scrollbar. Are you sure you did it on the right listbox? Or did you change the correct property?
-
Jan 25th, 2006, 08:57 AM
#6
Hyperactive Member
Re: select statements in vb.net
What is wrong with a combobox for this? You can only select one value and you can have it dropdown to see all other values available to be selected.
Why would this not work?
Currently Using: VS 2005 Professional
-
Jan 25th, 2006, 09:20 AM
#7
Re: select statements in vb.net
Either use a DropDownList or a ListBox with the MultiSelect property set to false.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|