Expanding the size of wx Frame

S

sundarvenkata

hello all, is there a way to make wxpython frame to expand itself
as we add controls to it
 
K

kyosohma

hello all, is there a way to make wxpython frame to expand itself
as we add controls to it

Yes. I recommend using sizers. Then you can have the frame fit the
widgets it holds using the Fit() command. I think this only applies
when you first create the frame. After that the usual way is to call
Layout() or Refresh() on the parent of the widgets (the frame in this
case).

I've done something like this before when I've changed elements in my
panel:

self.SetClientSize(self.panel.GetBestSize())

You might also find the wx.CollapsiblePane valuable.

Mike
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,444
Messages
2,571,708
Members
48,796
Latest member
Greg L.
Top