|
From: | Simon Guindon |
Subject: | [DotGNU]Winforms control layout bug |
Date: | Wed, 3 Nov 2004 21:02:14 -0500 |
Hey guys, this email is in response to my last
one.
I spent another 4 or so hours trying to track down
this layout bug, and I assembled a simple to try test case.
I'm looking for some feedback or insight on perhaps
a solution. I've tried to figure it out but a little lost.
The anchoring/sizing isn't happening
properly. The control is a UserControl, not derived directly from
Control.
The Control is docked top, left and right.
This is an app from VS.NET.
The UserControl is anchoring properly, but child
controls inside it, are not.
VS.NET designer is setting the form to suspend
layout, then calling ResumeLayout(false) after the controls are added to the
form. But that means the controls are never getting PerformLayout() being
called. I'm not sure if this is the issue or not. I was thinking of
doing this.
If ResumeLayout(false) is called, but
PerformLayout() has never been called, maybe its ok to call it?
I hope I'm making sense. The problem is hard
to explain, you really need to compile and try the test case to understand. I've
really tried to solve this myself, but I'm stuck and I don't want to break or
tear down PNET winforms performance from asking it to layout or draw too
much.
Curious if I'm on the right track or totally
off.
Included are the 2 files that need to be compiled
to test it. If you notice, the control itself is anchoring fine, but any
child controls inside the UserControl are not.
Any help greatly appreciated!
Thanks,
Simon
|
TestControl.cs
Description: Text document
Form1.cs
Description: Text document
[Prev in Thread] | Current Thread | [Next in Thread] |