Question Command Button to add new combobox

Joe1

Active member
Joined
Dec 4, 2012
Messages
37
Programming Experience
Beginner
Hello,
Not sure whether or not this is posted in the correct place, if not feel free to move it..
I am relatively new to VB and am looking for help.

I am trying to make a button to add another combobox/listbox below the previous one, and so on. So the form would open with one combobox and and button, when clicked produces a repeat of box immediately below it. and then if clicked again another one will appear below that, and so on.

Can anyone help?

I have this:


Private Sub ComboBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ComboBox1.SelectedIndexChanged

End Sub

Private Sub AddButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AddButton.Click

End Sub
 
Thank you for your reply.

The DataGridView doesn't seem to provide me with the desired result unfortunately, however I am very new to this so may work.

I am ideally looking for an unlimited amount of combobox able to be produced, underneath each other all linked to the same database but so the user can add the required number of outputs
 
Thanks for that. Using this method will I be able to using this to output to a further window which can show the variables/parameters the user has chosen? As a note these variables will be output from another program, as I am producing a plugin. Therefore the parameters are not of a fixed value
 
Could this be done? I have many (100s+) of Input and Output parameters from the program therefore I couldn't link the combobox with a database as this wouldn't pick up the values from the program surely?
 
You're going to have to provide a clearer explanation of what you want to achieve if you want actual instructions on how to achieve it but whether or not you can move data between forms is unrelated to the UI. That's just how you display the data.
 
Thanks for your continued help.

I am producing a plugin for some software. The main aim is to display any number of parameters (chosen by the user).
I am currently trying to produce a window form application to allow the user to select which parameters (from the software) they would like to be displayed.

For example the user may want to see the the tolerance, units used (mm/inches), and current tool. but not want to see certain other parameters.


My idea from this was to have a combobox with all the paramters, and then a check button.
The user could then select a parameter from the list, check the box if they wanted to display it in the next window.
An "add new parameter" button would produce another identical combobox and checkbox below the initial one, and so on. So the user could have an unlimited number of parameters shown in the next window from the software.

Any further help would be much appreciated
 
Back
Top