[IronPython] Possible problem with DockStyle.Fill
Patrick O'Brien
sum.ergo.code at gmail.com
Sun Dec 3 00:48:13 CET 2006
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ironpython-users/attachments/20061202/33c2db1d/attachment.html>
More information about the Ironpython-users
mailing list