I have an application that was working fine with wxPython 2.4.x. I am calling a wxp module from an html page that uses htmlWindow. The module calls a wx "applet" with a default size of 500x300. The "applet" is a *_wdr.py file created with wxDesigner. After updating to wxPython 2.5.3.1, when I launch the "applet", instead of fitting nicely in the 500x300 window the "applet" has sized itself so that there is a huge amount of space between each object. So now I have a window with horizontal and vertical scroll bars which has taken up the entire htmlWindow, instead of the 500x300 space I am looking for. I haven't been able to find the exact change that must be made to keep the "applet" from expanding beyond the 500x300 space I want it to be in. Can anyone help me with this situation. I have also upgraded to wxPython 2.5.4.1, however this hasn't changed the problem.
I have an application that was working fine with wxPython 2.4.x. I am calling a wxp module from an html page that uses htmlWindow. The module calls a wx "applet" with a default size of 500x300. The "applet" is a *_wdr.py file created with wxDesigner. After updating to wxPython 2.5.3.1, when I launch the "applet", instead of fitting nicely in the 500x300 window the "applet" has sized itself so that there is a huge amount of space between each object. So now I have a window with horizontal and vertical scroll bars which has taken up the entire htmlWindow, instead of the 500x300 space I am looking for. I haven't been able to find the exact change that must be made to keep the "applet" from expanding beyond the 500x300 space I want it to be in. Can anyone help me with this situation. I have also upgraded to wxPython 2.5.4.1, however this hasn't changed the problem.
Have you tried working with the wdr file in a newer version of wxDesigner that was built with wx 2.5.x? Do you specify the width and height in the <wxp> tag? Does the applet set its own size with SetSize or similar? How does the applet behave if you don't use it with a HtmlWindow but stick it in a frame? What is the initial default size of the applet and also what does applet.GetBestSze() return?
···
--
Robin Dunn
Software Craftsman http://wxPython.org Java give you jitters? Relax with wxPython!
Yes, I have downloaded and rebuilt the wdr file using the latest wxDesigner, no effect.
Yes, width and height are specified in the <wxp> tag.
Here is the code that wxDesigner generated to set the size at the end of the wdr file;
if set_sizer == True:
parent.SetSizer( item0 )
if call_fit == True:
item0.SetSizeHints( parent )
I have not tried to launch it in just a frame, I'll try that today.
I have not tried to check the return value on applet.GetBestSze(), I'll also try that today.
Thanks for the input!!!!!
···
From: Robin Dunn <robin@alldunn.com>
Reply-To: wxPython-users@lists.wxwidgets.org
To: wxPython-users@lists.wxwidgets.org
Subject: Re: [wxPython-users] migrating to 2.5.3.1 caused sizer problem with htmlWindow
Date: Wed, 23 Mar 2005 17:40:41 -0800
Gregory Miller wrote:
I have an application that was working fine with wxPython 2.4.x. I am calling a wxp module from an html page that uses htmlWindow. The module calls a wx "applet" with a default size of 500x300. The "applet" is a *_wdr.py file created with wxDesigner. After updating to wxPython 2.5.3.1, when I launch the "applet", instead of fitting nicely in the 500x300 window the "applet" has sized itself so that there is a huge amount of space between each object. So now I have a window with horizontal and vertical scroll bars which has taken up the entire htmlWindow, instead of the 500x300 space I am looking for. I haven't been able to find the exact change that must be made to keep the "applet" from expanding beyond the 500x300 space I want it to be in. Can anyone help me with this situation. I have also upgraded to wxPython 2.5.4.1, however this hasn't changed the problem.
Have you tried working with the wdr file in a newer version of wxDesigner that was built with wx 2.5.x? Do you specify the width and height in the <wxp> tag? Does the applet set its own size with SetSize or similar? How does the applet behave if you don't use it with a HtmlWindow but stick it in a frame? What is the initial default size of the applet and also what does applet.GetBestSze() return?
--
Robin Dunn
Software Craftsman http://wxPython.org Java give you jitters? Relax with wxPython!
---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org
For additional commands, e-mail: wxPython-users-help@lists.wxwidgets.org
I have created an offline frame, placed a panel on it and the "applet" launches correctly. When I use the GetBestSize() on the parent, in the application that fails, it returns 2532x1402. When I use the GetBestSize() on the offline app it returns 524x304. I set the default size of the "applet" to 500x300.
···
From: "Gregory Miller" <et1ssgmiller@hotmail.com>
Reply-To: wxPython-users@lists.wxwidgets.org
To: wxPython-users@lists.wxwidgets.org
Subject: Re: [wxPython-users] migrating to 2.5.3.1 caused sizer problem with htmlWindow
Date: Thu, 24 Mar 2005 12:13:19 +0000
Here are the answers to your questions:
Yes, I have downloaded and rebuilt the wdr file using the latest wxDesigner, no effect.
Yes, width and height are specified in the <wxp> tag.
Here is the code that wxDesigner generated to set the size at the end of the wdr file;
if set_sizer == True:
parent.SetSizer( item0 )
if call_fit == True:
item0.SetSizeHints( parent )
I have not tried to launch it in just a frame, I'll try that today.
I have not tried to check the return value on applet.GetBestSze(), I'll also try that today.
Thanks for the input!!!!!
From: Robin Dunn <robin@alldunn.com>
Reply-To: wxPython-users@lists.wxwidgets.org
To: wxPython-users@lists.wxwidgets.org
Subject: Re: [wxPython-users] migrating to 2.5.3.1 caused sizer problem with htmlWindow
Date: Wed, 23 Mar 2005 17:40:41 -0800
Gregory Miller wrote:
I have an application that was working fine with wxPython 2.4.x. I am calling a wxp module from an html page that uses htmlWindow. The module calls a wx "applet" with a default size of 500x300. The "applet" is a *_wdr.py file created with wxDesigner. After updating to wxPython 2.5.3.1, when I launch the "applet", instead of fitting nicely in the 500x300 window the "applet" has sized itself so that there is a huge amount of space between each object. So now I have a window with horizontal and vertical scroll bars which has taken up the entire htmlWindow, instead of the 500x300 space I am looking for. I haven't been able to find the exact change that must be made to keep the "applet" from expanding beyond the 500x300 space I want it to be in. Can anyone help me with this situation. I have also upgraded to wxPython 2.5.4.1, however this hasn't changed the problem.
Have you tried working with the wdr file in a newer version of wxDesigner that was built with wx 2.5.x? Do you specify the width and height in the <wxp> tag? Does the applet set its own size with SetSize or similar? How does the applet behave if you don't use it with a HtmlWindow but stick it in a frame? What is the initial default size of the applet and also what does applet.GetBestSze() return?
--
Robin Dunn
Software Craftsman http://wxPython.org Java give you jitters? Relax with wxPython!
---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org
For additional commands, e-mail: wxPython-users-help@lists.wxwidgets.org
---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org
For additional commands, e-mail: wxPython-users-help@lists.wxwidgets.org
I have created an offline frame, placed a panel on it and the "applet"
launches correctly. When I use the GetBestSize() on the parent, in the
application that fails, it returns 2532x1402.
Well, that *does* sound like a rather nice resolution, so maybe this is
the best size after all.
Unfortunately it's not, the "applet" is a set of buttons and text controls created with wxDesigner that are used to run a service routine on a piece of hardware. The "applet" must fit into the ~500x300 area within the wxHTMLWindow so that the operator can see all of it. As it is now when it launches the former 500x300 ( pixels ) area has expanded to 100% of the applications width and most of the height. There are now scroll bars so that the "applet" can be seen but there is a huge amount of space between all the objects. I need to find out what the upgrade to 2.5.3.1 did to expand the "applet" to this huge size, and what I need to do to shrink it back down to the original size.
···
From: Annius Groenink <groenink@xs4all.nl>
Reply-To: wxPython-users@lists.wxwidgets.org
To: wxPython-users@lists.wxwidgets.org
Subject: Re: [wxPython-users] migrating to 2.5.3.1 caused sizer problem with htmlWindow
Date: Thu, 24 Mar 2005 15:12:55 +0100 (CET)
> I have created an offline frame, placed a panel on it and the "applet"
> launches correctly. When I use the GetBestSize() on the parent, in the
> application that fails, it returns 2532x1402.
Well, that *does* sound like a rather nice resolution, so maybe this is
the best size after all.
Annius.
---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org
For additional commands, e-mail: wxPython-users-help@lists.wxwidgets.org
Did this change from wxPython 2.4.x to wxPython 2.5.x? I didn't change the _wdr code initially, simply updated to 2.5.3.1 and the problem appeared. Yes, the parent is the HTMLWindow. The code returned this:
parent is <serviceHTMLtab.MyHtmlWindow; proxy of C++ wxPyHtmlWindow instance at _d07ddd01_p_wxPyHtmlWindow>
Since allowing the HTMLWindow to set the sizer is a bad thing, should I use the wxPanel that calls the _wdr file as the object which sets the size?
Thanks again for your input!!!!!!!!
···
From: Robin Dunn <robin@alldunn.com>
Reply-To: wxPython-users@lists.wxwidgets.org
To: wxPython-users@lists.wxwidgets.org
Subject: Re: [wxPython-users] migrating to 2.5.3.1 caused sizer problem with htmlWindow
Date: Thu, 24 Mar 2005 11:00:46 -0800
Gregory Miller wrote:
if set_sizer == True:
parent.SetSizer( item0 )
if call_fit == True:
item0.SetSizeHints( parent )
If the parent is the HtmlWindow you definitly do not want to let it set the sizer or call SetSizeHints.
--
Robin Dunn
Software Craftsman http://wxPython.org Java give you jitters? Relax with wxPython!
---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org
For additional commands, e-mail: wxPython-users-help@lists.wxwidgets.org
Did this change from wxPython 2.4.x to wxPython 2.5.x?
A number of things related to sizers changed. (See http://wxpython.org/MigrationGuide.html#sizers) Also, sizers on wx.ScrolledWindows (the base class of HtmlWindow) will use the virtual size of the scrolled window for calculating the layout rather than the client size. (This is probably what is tripping you up.)
I didn't change the _wdr code initially, simply updated to 2.5.3.1 and the problem appeared. Yes, the parent is the HTMLWindow. The code returned this:
parent is <serviceHTMLtab.MyHtmlWindow; proxy of C++ wxPyHtmlWindow instance at _d07ddd01_p_wxPyHtmlWindow>
Since allowing the HTMLWindow to set the sizer is a bad thing, should I use the wxPanel that calls the _wdr file as the object which sets the size?
Yes, that's what I would do. The HtmlWindow class that manages holding a widget in an html "cell" expects that there is just one window that it needs to deal with. If you have multiple windows being placed on the HtmlWindow in the sizer then I expect that those assumptions would break things. If you just give it a panel then the wxHtmlWidgetCell class can set its size from the values you give in the <wxp> tag and then its sizer can manage all the child controls within that space.
···
--
Robin Dunn
Software Craftsman http://wxPython.org Java give you jitters? Relax with wxPython!