|
From: | Simon Guindon |
Subject: | [DotGNU]Winform patches |
Date: | Tue, 26 Oct 2004 22:13:04 -0400 |
Hey all,
I hit a few bugs in PNET Winforms this week, I've
been in the process of porting my IM application to PNET from .NET
Basically one was in StatusBar, where StatusBar was
using the Form's BackColor, how most controls work, but on .NET StatusBar uses
SystemColors.Control, so I fixed, and I have a patch here for, since I was the
one who wrote StatusBar
statusbar.patch
Now my big issue. During testing, I found
some layout bugs. I decided to attempt to debug and fix these issues
myself instead of just posting the bug. I'm not sure if my solution is
good, so I'm hoping for some feedback from the community.
Basically this is how the form should look
like:
(Notice the Tasks control, is anchored top, left,
right, so the edges follow the window resizing)
Now here is the app on PNET:
(Notice the Tasks control isn't fully to the
right)
So after some struggles, I think I sorta know the
issue. Basically the Tasks control is built using UserControl, not
Control.
In the Tasks VS.NET project, its sized at 156, so
this is the size its getting, but its dragged and dropped, and resized on the IM
apps Form, with a size of 244, which isn't being updated on PNET.
Now in Control.Size property, nowhere does it
update the layout. So in my patch, after setting the new sizes, I added a
call to
PerformActualLayout(); And now it seems to work great, everything is suddenly fixed. So is this a good solution? What happens if SuspendLayout occurs, and the Control's size is changed, it shouldn't PerformActualLayout not occur, but how does the object update. I'm quite confused, but I'm impressed I got it fixed, but I think you guys will let me know that is the wrong fix. I would like to know if there are any better options or if this is acceptable? I know the Trumpf project has been having various layout issues. I haven't seen this issue occur on a Control derived control, so far only my UserControl one. Anyways thanks for listening. Any help is greatly appreciated. Please commit the patches if you think I solved the issues nicely. Take care. |
statusbar.patch
Description: Binary data
control.patch
Description: Binary data
[Prev in Thread] | Current Thread | [Next in Thread] |