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