Hi Everybody
I am attempting to put few data into my DataBase from two Combo Boxes in Flash.
But I am not able to manage combo box in flash.
I don’t have any idea that how to assign a “var” value to combo box like we give for a usual textfield.
I have additional pages where I have usual text fields that work well as I can identify the “var” value in the properties however not for combo boxes.
Can somebody help me how to fix it?
Thanks in advance
How can I manage combobox in flash?
Hello , Kimberly
Hope you are fine. I think I can give you a solution.
So don’t worry.
You may make an Enum to contain the
values. Their descriptions are below:
Code:
Public Enum Modes
Distance = 1
Time = 2
End
Enum
Now bind the Enum to the ComboBox:
Code:
Private
Sub MyForm_Load(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles
MyBase.Load
cmbMode.DataSource =
System.Enum.GetValues(GetType(Modes))
End
Sub
Now read the value selected in the ComboBox's into an Integer variable:
Code:
Dim
Mode As Integer = CInt(cmbMode.SelectedValue)
Otherwise you may also try this
var dropdown = document.getElementById('dropdown');var list = [ "first", "second", "third"]; // remove old optionswhile (dropdown.length> 0) { dropdown.remove(0);} // add new onesfor (var i=0;i<list.length; i++) { var option = document.createElement("option"); option.textContent = list[i]; option.value = i; dropdown.appendChild(option);}
Hope you will get your answer.