[Mono-bugs] [Bug 330501] New: ComboBox: OnValidating method not called on form close

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Wed Oct 3 13:57:00 EDT 2007


           Summary: ComboBox: OnValidating method not called on form close
           Product: Mono: Class Libraries
           Version: 1.2
          Platform: x86
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: Windows.Forms
        AssignedTo: mono-bugs at ximian.com
        ReportedBy: kobruleht2 at hot.ee
         QAContact: mono-bugs at ximian.com
          Found By: ---

Steps to reproduce issue:

1. Run code
2. Close window by pressing cross in upper right window


Window is closed


Window should not closed. Lookup form should appear.

using System;
using System.Windows.Forms;

        public class Form1 : Form {
MyComboBox MyCombobox = new MyComboBox();

                public static void Main() {
                        try {
                                Application.Run(new Form1());
                        catch (Exception e) {

                public Form1() {
                TextBox         tb = new TextBox();
                        tb.Top = 200;


public class MyComboBox : ComboBox {

        protected override void
OnValidating(System.ComponentModel.CancelEventArgs e) {
                e.Cancel = true;
                Form f = new Form();
                f.Text = "Modeless lookup form";

Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.

More information about the mono-bugs mailing list