The enum values can be bound to a combobox as follows:
MyValues is the enum type
[C#]
// Setup the binding as follows:
comboBox1.DataSource = Enum.GetValues(typeof MyValues);
// SelectedValueChanged event for the ComboBox.
private void ComboBox1ValueChanged(object sender, EventArgs e)
{
MyValues v = (MyValues) comboBox1.SelectedValue;
}
[Visual Basic]
comboBox1.DataSource = Enum.GetValues(Type.GetType(MyValues))
Private Sub ComboBox1ValueChanged(ByVal sender As Object, _
ByVal e As EventArgs)
Dim v As MyValues = CType(comboBox1.SelectedValue, MyValues)
End Sub
Jay Harlow