Please do not reply to this email- if you want to comment on the bug, go to the URL shown below and enter your comments there.
Changed by [EMAIL PROTECTED] http://bugzilla.ximian.com/show_bug.cgi?id=78458 --- shadow/78458 2006-05-19 13:57:50.000000000 -0400 +++ shadow/78458.tmp.20044 2006-05-19 13:57:50.000000000 -0400 @@ -0,0 +1,117 @@ +Bug#: 78458 +Product: Mono: Class Libraries +Version: 1.1 +OS: SUSE 9.2 +OS Details: also on FedoraCore4 +Status: NEW +Resolution: +Severity: +Priority: Major +Component: Windows.Forms +AssignedTo: [EMAIL PROTECTED] +ReportedBy: [EMAIL PROTECTED] +QAContact: [EMAIL PROTECTED] +TargetMilestone: --- +URL: +Cc: +Summary: Enable Panel does not enable it's contents correctly + +Description of Problem: +I have placed some Windows.Form Controls (like checkBox or comboBox) on a +panel, that is disabled. If the enable state is updated, the controls on +the panel are not updated correctly. The checkBox for example looks like +it's enabled, but it's not clickable. + + +Steps to reproduce the problem: +1. Create a panel in a Windows.Form, panel.Enabled = false +2. Add the checkbox to the panel +3. enable/disable the panel by the program + +Actual Results: +The checkBox turns from grayed-out to normal, but it is not possible to +change the checkBox state by clicking it. The checkBox is only an example, +this does happen with other controls, too. Some controls even do not +reflect the enable state optically correct (like comboBox). + +Expected Results: +The checkBox (and other controls) should be enabled/disabled like the +parent panel and should reflect the state. + +How often does this happen? +always + +Additional Information: +SourceCode from VisualStudio.Net with little test application: + +using System; +using System.Drawing; +using System.Collections; +using System.Windows.Forms; +using System.Data; + +namespace monotest +{ + public class Form1 : System.Windows.Forms.Form + { + private System.Windows.Forms.ComboBox comboBox; + private System.Windows.Forms.CheckBox checkBox; + private System.Windows.Forms.CheckBox checkBoxEnable; + private System.Windows.Forms.Panel panel; + + public Form1() + { + InitializeComponent(); + } + + protected override void Dispose( bool disposing ) + { + base.Dispose( disposing ); + } + + private void InitializeComponent() + { + this.panel = new System.Windows.Forms.Panel(); + this.comboBox = new System.Windows.Forms.ComboBox(); + this.checkBox = new System.Windows.Forms.CheckBox(); + this.checkBoxEnable = new System.Windows.Forms.CheckBox(); + + this.panel.BackColor = System.Drawing.Color.Gainsboro; + this.panel.Controls.Add(this.comboBox); + this.panel.Controls.Add(this.checkBox); + this.panel.Enabled = false; + this.panel.Location = new System.Drawing.Point(16, 56); + this.panel.Size = new System.Drawing.Size(128, 80); + + this.comboBox.Items.Add("test1"); + this.comboBox.Items.Add("test2"); + this.comboBox.Items.Add("test3"); + this.comboBox.Location = new System.Drawing.Point(14, 48); + this.comboBox.Size = new System.Drawing.Size(100, 21); + + this.checkBox.Location = new System.Drawing.Point(14, 10); + this.checkBox.Text = "checkBox"; + + this.checkBoxEnable.Location = new System.Drawing.Point(24, 16); + this.checkBoxEnable.Text = "Enable Panel"; + this.checkBoxEnable.CheckStateChanged += new +System.EventHandler(this.checkBoxEnable_CheckStateChanged); + + this.ClientSize = new System.Drawing.Size(162, 156); + this.Controls.Add(this.checkBoxEnable); + this.Controls.Add(this.panel); + this.Text = "Form1"; + } + + static void Main() + { + Application.Run(new Form1()); + } + + private void checkBoxEnable_CheckStateChanged(object sender, +System.EventArgs e) + { + this.panel.Enabled = this.checkBoxEnable.Checked; + } + } +} _______________________________________________ mono-bugs maillist - [email protected] http://lists.ximian.com/mailman/listinfo/mono-bugs
