// Browse for value public void Browse(IWin32Window parent) { if (fieldtype != null) { // Browse for value fieldtype.Browse(parent); // This is a fixed field? if (rowtype == FieldsEditorRowType.FIXED) { // Does this match the default setting? if (fieldtype.GetValue().Equals(fieldinfo.Default)) { // Undefine this field! Undefine(); } else { // Define Define(fieldtype.GetValue()); } } else { // Define Define(fieldtype.GetValue()); } } }
// When browse button is clicked private void button_Click(object sender, EventArgs e) { // Browse for a value typehandler.Browse(this); combobox.SelectedItem = null; combobox.Text = typehandler.GetStringValue(); combobox.Focus(); combobox.SelectAll(); }