[IronPython] Possible problem with DockStyle.Fill

Haibo Luo haiboluo at exchange.microsoft.com
Mon Dec 4 18:54:40 CET 2006


This is related to Z-Order in Winforms. You can take a look at MSDN document, or I found http://geekswithblogs.net/mtreadwell/archive/2005/03/05/25397.aspx online.

Adding "button.BringToFront" works:

form.Controls.Add(menu_strip)
form.Controls.Add(button)
button.BringToFront()   # add this
SWF.Application.Run(form)


From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Patrick O'Brien
Sent: Monday, December 04, 2006 9:43 AM
To: Discussion of IronPython
Subject: Re: [IronPython] Possible problem with DockStyle.Fill

On 12/4/06, Martin Maly <Martin.Maly at microsoft.com<mailto:Martin.Maly at microsoft.com>> wrote:

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...
I created a similar C# app and can confirm that it behaves the same way.  If this is not a bug, it is extremely counterintuitive behavior.  I could see the button getting truncated by the menu if I added the button with Fill first, then added the menu.  But that is the order that works fine.  The one that truncates is when you add the menu, then add the button.  Whatever it is, it certainly isn't nice.  :-(

--
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/20061204/954c72b5/attachment.html>


More information about the Ironpython-users mailing list