[Mono-bugs] [Bug 77260][Nor] New - Unbound System.Windows.Forms.DataGrid on a System.Windows.Forms.Form derived form does not repaint when size is changed in Layout event

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Sat Jan 14 18:33:40 EST 2006


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 bugbuddy-import at ximian.com.

http://bugzilla.ximian.com/show_bug.cgi?id=77260

--- shadow/77260	2006-01-14 18:33:40.000000000 -0500
+++ shadow/77260.tmp.20169	2006-01-14 18:33:40.000000000 -0500
@@ -0,0 +1,124 @@
+Bug#: 77260
+Product: Mono: Class Libraries
+Version: unspecified
+OS: GNU/Linux [Other]
+OS Details: 
+Status: UNCONFIRMED   
+Resolution: 
+Severity: Unknown
+Priority: Normal
+Component: Windows.Forms
+AssignedTo: triage at ximian.com                            
+ReportedBy: bugbuddy-import at ximian.com               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Unbound System.Windows.Forms.DataGrid on a System.Windows.Forms.Form derived form does not repaint when size is changed in Layout event
+
+Distribution: Debian testing/unstable
+Package: Mono: Class Libraries
+Priority: Normal
+Version: GNOME2.10.2 unspecified
+Gnome-Distributor: Debian
+Synopsis: Unbound System.Windows.Forms.DataGrid on a System.Windows.Forms.Form derived form does not repaint when size is changed in Layout event
+Bugzilla-Product: Mono: Class Libraries
+Bugzilla-Component: Windows.Forms
+Bugzilla-Version: unspecified
+Description:
+Description of Problem:
+I placed a System.Windows.Forms.DataGrid on a
+System.Windows.Forms.Form.
+The datagrid is not bound to a dataset.
+When resizing the grid on the form it gets not painted and the
+background (fuzzy things under the window shine thru).
+
+Snipped...............
+.
+.
+.
+	private void InitializeComponent() 
+		{
+			this.SuspendLayout();
+			
+			.
+			.
+			.
+		
+		 	this.PostingsGrid = new System.Windows.Forms.DataGrid();
+			this.PostingsGrid.Location = new System.Drawing.Point( CTLSPACING,
+this.ConnectButton.Top + this.ConnectButton.Height + CTLSPACING );
+			this.PostingsGrid.Size = new System.Drawing.Size( this.Width - 2 *
+CTLSPACING, this.AbortButton.Top - ( CTLSPACING + this.PostingsGrid.Top
+)  );
+			this.PostingsGrid.Name = "PostingsGrid";
+		 	
+			this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
+			this.ClientSize = new System.Drawing.Size(384, 389);
+
+			this.Controls.AddRange( new Control[] { ...
+			                                      , this.PostingsGrid
+			                                      , ... } ); 
+			
+			this.Name = "MainForm";
+			this.Layout += new
+System.Windows.Forms.LayoutEventHandler(this.MainForm_Layout);
+			this.ResumeLayout( false );			
+		}
+
+
+		private void MainForm_Layout(object sender,
+System.Windows.Forms.LayoutEventArgs e)
+		{
+			Control control = (Control)sender;			
+			
+			.
+			.
+			.
+
+			this.PostingsGrid.Location = new System.Drawing.Point( CTLSPACING,
+this.ConnectButton.Top + this.ConnectButton.Height + CTLSPACING );
+			this.PostingsGrid.Size = new System.Drawing.Size( this.Width - 2 *
+CTLSPACING, this.AbortButton.Top - ( CTLSPACING + this.PostingsGrid.Top
+) );
+	//		this.PostingsGrid.Invalidate();
+		}
+
+
+Steps to reproduce the problem:
+1. create a class for a form wichis based on System.Windows.Forms.Form 
+2. add a System.Windows.Forms.DataGrid and a Layout-Event in
+InitializeComponent()
+3. resize the grid when Layout occurs
+
+Actual Results:
+resized datagrid is not redrawn on the form. (buttons and combos and
+textboxes are no problem).
+
+Expected Results:
+datagrid sould be redrawn with the new size.
+
+How often does this happen?
+Everytime
+
+Additional Information:
+if someone need it i can make a very simple demo project.
+
+andishfr at c1020:~$ dpkg -l | grep mono
+ii  libmono0                    1.1.12.1-1                 libraries for the Mono JIT
+ii  mono-assemblies-base        1.1.12.1-1                 Mono class library - transistion package
+ii  mono-classlib-1.0           1.1.12.1-1                 Mono class library (1.0)
+ii  mono-common                 1.1.12.1-1                 common files for Mono
+ii  mono-jit                    1.1.12.1-1                 fast CLI (.NET) JIT compiler for Mono
+ii  mono-mcs                    1.1.12.1-1                 Mono C# compiler
+ii  monodevelop                 0.9-1                      C#/Boo/Java/Nemerle/ILasm Development Enviro
+ii  monodevelop-versioncontrol  0.9-1                      VersionControl plugin for MonoDevelop
+ii  monodoc-base                1.1.9-1                    shared MonoDoc binaries
+ii  monodoc-manual              1.1.9-1                    compiled XML documentation from the Mono pro
+
+
+Unknown reporter: AndiSHFR at gmx.net, changed to bugbuddy-import at ximian.com.
+Setting qa contact to the default for this product.
+   This bug either had no qa contact or an invalid one.
+
+


More information about the mono-bugs mailing list