I think because of my code it will make this a bit more tricky to implement.
See.. I already have two combo boxes. The first one has a list of devices and when you select a device the second combobox displays a list of commands that are used for that device. So you see the second combobox is already populated by the first combo box.
Code:Public lists As New Dictionary(Of String, String())Code:Me.lists.Add("Panasonic Projector", New String() {"On", "Off"}) Me.lists.Add("Other Projector", New String() {"On", "Off"}) Me.lists.Add("Other", New String() {"Choice1", "Choice2"}) For Each key As String In Me.lists.Keys Me.comDevice.Items.Add(key) Next keyThats the code I'm using.Code:Private Sub comDevice_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles comDevice.SelectedIndexChanged Me.comButton1.DataSource = Me.lists(CStr(Me.comDevice.SelectedItem)) End Sub
Is there a way to make a structure that will have a device, with command options which each have an option of their own?




Reply With Quote