I hva the following code to a combobox that can be entering data
Dim x_City As ComboBox = New ComboBox(True)
x_City.Move(20, 108, 320, 26)
Dim All_City As Array Of String = ["London","Tokyo","Paris"]
For Each Each_City As String In All_City
x_City.AddItem(Each_City)
Next
x_City.Text = "Type a city…"
w.AddSubview(x_City)
how to I do the same using Control block ?
Class cboCity Inherits ComboBox
Handle SelectionChanged()
print("cboCity - Picked: " + Me.Text)
End Handle
Public Function SetCombo_City() as String
Dim All_City As Array Of String = ["London","Tokyo","Paris"]
For Each Each_City As String In All_City
Me.AddItem(Each_City)
Next
END Function
Public Function SetCity() as String
me.SelectedIndex = 0
END Function
End Class
Public Window Combobox_03_Layout
Control cboCity x_cboCity
Frame = (20, 108, 320, 26)
' Handle SelectionChanged()
' print("cboCity - Picked: " + Me.Text)
' End Handle
end Control
End Window
