c00kiemonster
c00kiemonster

Reputation: 23341

How can I get a wxFrame to refresh without having to manually resize it in wxPython?

I have a simple frame in a wxPython script that isn't refreshing like I'd like it to.

Basically the frame starts out blank. The user can then select different datasets to view in a grid form. When the dataset has been chosen, the script creates a grid and puts it in a sizer in the frame. The problem is that the frame shows the grid in a very small size, the sizer isn't expanding like it should (or at least how I'd expect it to). Furthermore when I resize the frame manually (ie with the mouse) the sizer suddenly expands like it should, and the whole frame is filled with the grid.

How can I get the sizer to expand the grid right away, and not only when I resize the frame manually?

Upvotes: 0

Views: 864

Answers (1)

Steven Sproat
Steven Sproat

Reputation: 4578

Call Layout() on the sizer containing the grid.

Upvotes: 3

Related Questions