473,386 Members | 1,798 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

wxPython, how to autoresize a frame?

Dear all,

In a wxPyhton frame I make a group of controls hiding by pressing a button
and i want the whole frame to resize accordingly.

The test GUI I wrote is structured like this:

frame
|
+-sizer0 (BoxSizer, 1 slot)
|
+-panel (style=wx.EXPAND)
|
+-sizer1 (BoxSizer vertical, 2 slots)
|
+-sizer2 (FlexGridSizer, 2x2)
| |
| +-controls to hide
|
+-button
The problem is that, when sizer2 containig hidden controls collapses to
zero dimensions, the panel resizes, but sizer1 and sizer0 don't!
Consequently the frame does not want to autoresize.

You con dowload the code here:
http://www.box.net/public/evfxs7cp5j

Someone con help me?

Thanks

David
Sep 10 '06 #1
1 1939
Il Sun, 10 Sep 2006 19:15:40 +0200, David ha scritto:
The problem is that, when sizer2 containig hidden controls collapses to
zero dimensions, the panel resizes, but sizer1 and sizer0 don't!
Consequently the frame does not want to autoresize.

You con dowload the code here:
http://www.box.net/public/evfxs7cp5j

Someone con help me?
Best help came from mysef: the problem was in .SetSizeHints() statement
that prevented resizind of objects.

D.

--
R: Perche' incasina l'ordine con cui la gente normalmente legge un
messaggio
D: Perche' quotare sotto da' cosi' fastidio?
R: Quotare sotto.
D: Qual e' la cosa piu' seccante su usenet e in e-mail?
Sep 12 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: wang xiaoyu | last post by:
Hello: i want use activex in wxpython program,but when i use MakeActiveXClass an exception occurs. this is my source code dealing the DICOM ocx.I must note that in this program "hwtxcontrol" is...
6
by: Jive Dadson | last post by:
I'm trying (without conspicuous success) to start learning wxPython. Sooo... I opened the doc page wxPythonManual.html#wxpython-overview. The very first example does not work. Try it. I find...
1
by: mdk.R | last post by:
Hello all: i'am installed wxPython 2.5 and Python2.3.4..i try execute script with wxPython but it show error: Traceback (most recent call last): File "E:\py\test.py", line 7, in ? import wx...
3
by: John Salerno | last post by:
I'm using the sample code of the file 'simple.py' and trying to make a single window with a panel in it, but I keep getting an error. Here's my code: (I know I might need something else, like a...
9
by: zxo102 | last post by:
Hi everyone, I am using a python socket server to collect data from a socket client and then control a image location ( wxpython) with the data, i.e. moving the image around in the wxpython frame....
9
by: Tyler | last post by:
Hello All: I am currently working on a project to create an FEM model for school. I was thinking about using wxPython to gather the 12 input variables from the user, then, after pressing the...
4
by: Jimmy | last post by:
Hi, wxPython is cool and easy to use, But I ran into a problem recently when I try to write a GUI. The thing is I want to periodically update the content of StatixText object, so after create...
0
by: Stef Mientki | last post by:
Peter Anderson wrote: In PyScripter, you should run wxPython in the plain remote machine (not the wxPython remote), and you should set "reset before run flag" or reset the remote machine each...
3
by: Netwatcher | last post by:
im try to activate the tutorial code for wxPython, it is working properly when i tell it to import * from wxPython.wx but with an error about the package, i've done as i was told to change the...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.