In the Combo Box Item Change event (there is one, double click the combo box)
[php]
If comx1.selecteditem (' or is it selected") = "what you want to check it against here" Then
Comx2.selecteditem = "this that and the other thing
end if
[/php]
ComboBox1
ComboBox2Code:M16A4 AK47 M4 Carbine G3 G36C M14 MP44
Ok this is what I am trying to make. If AK47 is selected in combox1 then:Code:ACOG Scope Red Dot Sight Silencer Grip Rifle Gernades
Code:ComboBox1= AK47so everything except the rifle gernades.Code:Combox2 = ACOG Scope Red Dot Sight Silencer Grip
How do this?
Is it like:
If so how would i do it?Code:If ComboBox1.Text = "AK47" Then ComboBox2.Items = "ACOG Scope,Red Dot Sight,Silencer,Grip"
In the Combo Box Item Change event (there is one, double click the combo box)
[php]
If comx1.selecteditem (' or is it selected") = "what you want to check it against here" Then
Comx2.selecteditem = "this that and the other thing
end if
[/php]
i dont think i explained it correctly.
so when i select AK47.
I want the items in ComboBox2 to be:
ACOG Scope
Red Dot Sight
Silencer
Grip
'since a rifle grenade cannot be attached to an AK47.
so how do i remove rifle grenade from the from the comx list?
To add an item it is
[php]
Comx1.items.add("Item To Add")
[/php]
To Remove an Item it is
[php]
Comx1.items.remove("Item To Remove")
[/php]
How do you remove all items from the combolist?
Code:ComboBox1.Items.Clear()