[Mono-bugs] [Bug 394332] New: Removing the next control in control.Leave causes crash
bugzilla_noreply at novell.com
bugzilla_noreply at novell.com
Sat May 24 18:58:29 EDT 2008
https://bugzilla.novell.com/show_bug.cgi?id=394332
Summary: Removing the next control in control.Leave causes crash
Product: Mono: Class Libraries
Version: SVN
Platform: Other
OS/Version: Other
Status: NEW
Severity: Normal
Priority: P5 - None
Component: Windows.Forms
AssignedTo: mono-bugs at lists.ximian.com
ReportedBy: equistango at gmail.com
QAContact: mono-bugs at lists.ximian.com
Found By: ---
The following code crashes:
public partial class Form1 : Form
{
private System.Windows.Forms.TextBox textBox1;
private System.Windows.Forms.TextBox textBox2;
public Form1()
{
this.textBox1 = new System.Windows.Forms.TextBox();
this.textBox2 = new System.Windows.Forms.TextBox();
this.textBox1.Location = new System.Drawing.Point(20, 16);
this.textBox1.TabIndex = 0;
this.textBox1.Leave += new
System.EventHandler(this.textBox1_Leave);
this.textBox2.Location = new System.Drawing.Point(20, 44);
this.textBox2.TabIndex = 1;
this.Controls.Add(this.textBox2);
this.Controls.Add(this.textBox1);
}
private void textBox1_Leave(object sender, EventArgs e)
{
this.Controls.Remove(this.textBox2);
}
}
The result with .NET is:
* When using the Tab key, the focus remains on textBox1.
* When using the mouse, the entire form loses focus :-/ (however, textBox1
remains the active control).
--
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