[Mono-winforms-list] Fwd: [Patch] Control.AutoSize

Stefan Noack noackstefan at googlemail.com
Wed Mar 28 14:08:29 EDT 2007


hi there

i have created this patch providing baisc autosize features. the default
layout engine has been extended to layouting autosized controls according to
their GetPreferredSize() return value. however the controls must override
this function to produce correct behaviour. UserControl currently tries to
provide enough space for all children, GroupBox should do the same
respecting its border and Button currently is producing rubbish when asked
for its preferred size. i have written a NUnit test for Control to ensure
that the layout engine correctly uses the preferred size honoring dock,
anchor, minimum and maximum sizes. this test passes under microsofts runtime
and under mono. tests for each control's autosize behaviour are still
missing. i hope this patch is helpful. it also contains minor extensions of
TabControl to provide accessing the tab pages by key.
the patch is attached after this message

greetz to all code monkeys :-(|)
noah
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-winforms-list/attachments/20070328/c62ac521/attachment.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: autosize.patch
Type: text/x-patch
Size: 16954 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/mono-winforms-list/attachments/20070328/c62ac521/attachment.bin 


More information about the Mono-winforms-list mailing list