I suspect that the same code written in VB/C# would behave the same way. This 
is most likely behavior of Windows Forms. Not being a winforms expert, I can't 
tell for sure whether this is correct behavior or a bug in Winforms...

Martin

From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Patrick O'Brien
Sent: Saturday, December 02, 2006 3:48 PM
To: [email protected]
Subject: [IronPython] Possible problem with DockStyle.Fill

I've either found a bug or a misunderstanding on my part.  I'd appreciate 
confirmation or either.  :-)

Running this bit of code the layout of the form appears as expected:

import clr
clr.AddReference('System.Windows.Forms ')
import System.Windows.Forms as SWF

form = SWF.Form()
menu_strip = SWF.MenuStrip()
button = SWF.Button()
button.Dock = SWF.DockStyle.Fill
form.Controls.Add(button)
form.Controls.Add(menu_strip)
SWF.Application.Run(form)


Whereas in the following example the button is cut off by the menu:

import clr
clr.AddReference('System.Windows.Forms')
import System.Windows.Forms as SWF

form = SWF.Form ()
menu_strip = SWF.MenuStrip()
button = SWF.Button()
button.Dock = SWF.DockStyle.Fill
form.Controls.Add(menu_strip)
form.Controls.Add(button)
SWF.Application.Run(form)


The only difference between the two bits of code is the order of the calls to ' 
form.Controls.Add()'.  Is this expected, or is this a bug?

--
Patrick K. O'Brien
Orbtech       http://www.orbtech.com
Schevo        http://www.schevo.org
Louie         http://www.pylouie.org
_______________________________________________
users mailing list
[email protected]
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com

Reply via email to