views:

60

answers:

0

First, is it possible to do a static auto-resize of the frame according to the grid? As in, when the script is run the frame is resized according to the grid, but if the grid is resized later on the frame stays the same size.

Second, is it possible to make the frame dynamically resize according to the grid? As in, the frame will resize according to the grid as soon as there is any change in the grid size.

Third, is it possible to make the grid resize to dynamically to the frame? As in, the grid will reize according to the frame as soon as there is any change in the frame size.

This simple code snippet below is a bare code example of a regular wx.grid. Could it be changed to accomodate the functionality above?

import wx 
import wx.grid

class TestFrame(wx.Frame):
    def __init__(self):
        wx.Frame.__init__(self, None, size=(640,480))
        grid = wx.grid.Grid(self)
        grid.CreateGrid(5,5)

app = wx.PySimpleApp()
frame = TestFrame()
frame.Show()
app.MainLoop()