I have a small bit of code here I am working with. The goal I have set forth was to scale the size of panel to the frame. Does the frame have a size property that can be fetched? Are there functions or methods (not sure I know the difference yet) that will allow scaling to the size of the frame maybe a sizer?
import wx
class KeyEvent(wx.Frame):
def __init__(self, parent, id, title):
frame = wx.Frame.__init__(self, parent, id, title)
panel = wx.Panel(self, -1)
button = wx.Button(self, -1, label="click me")
panel.Bind(wx.EVT_LEFT_UP, self.PanelLeftUp)
self.Show(True)
def PanelLeftUp(self, event):
print "left click occured"
app = wx.App()
KeyEvent(None, -1, 'keyevent.py')
app.MainLoop()import wx
By setting the button to be child of panel I see the panel will scale to 100% of its container (the frame). This though is not reallly what I wanted since I am then unable to set the dimension on the panel. It stays 100% no matter if I change its size value when created. Also would like to be able to change value of pos after creation.
possible?
additionally if I set panel to be child of frame the program ceases to run?
-- Andrew