[Mono-winforms-list] PATCH: Correct layouting of child controls on
windows with menus
monoman at gmail.com
Fri Aug 19 00:43:05 EDT 2005
I've spent the whole day chasing why my StatusBar, docked at the
bottom of my form, was nearly out-of-sight on MWF. The problem was
that the ClientSize wasn't being correctly adjusted by subtracting the
Menu height. The attached diff corrects the two problems leading to
this and some other bits, with the Changelog entry:
2005-08-19 Rafael Teixeira <rafaelteixeirabr at hotmail.com>
-- Making Windows with Menus layout correctly --
* XplatUI.cs : Just an updated console reminder
* Form.cs : The first leg of the fix
Menu setter - adjust Client Size as needed to make space for the menu
SetClientSizeCore - doesn't call base version to be able to pass the
menu handle to XplatUI.CalculateWindowRect
* Hwnd.cs: Fix for menu_height, now gets from MenuAPI.MENU
* XplatUIX11.cs: The critical second leg of the fix
GetWindowPos needs to use a recalculated client_rect
so that resizing the window doesn't break layout of child controls.
Also a more complete rule to avoid X Server roundtrips in SetWindowPos
May I commit?
Rafael "Monoman" Teixeira
I'm trying to become a "Rosh Gadol" before my own eyes.
See http://www.joelonsoftware.com/items/2004/12/06.html for enlightment.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 6750 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/mono-winforms-list/attachments/20050819/57851785/mwfmenuxlayout.bin
More information about the Mono-winforms-list