Add up, down, plus and - buttons to gviz

master
Kliment Yanev 2012-04-23 22:42:43 +02:00
parent 120740f002
commit 594d8edefe
1 changed files with 8 additions and 0 deletions

View File

@ -23,6 +23,14 @@ class window(wx.Frame):
# Set up a status bar for displaying info (Jezmy)
self.CreateStatusBar(1);
self.SetStatusText("Layer number and Z position show here when you scroll");
self.bu=wx.Button(self.p,-1,"U",pos=(0,0),size=(40,40))
self.bd=wx.Button(self.p,-1,"D",pos=(0,40),size=(40,40))
self.bi=wx.Button(self.p,-1,"+",pos=(40,0),size=(40,40))
self.bo=wx.Button(self.p,-1,"-",pos=(40,40),size=(40,40))
self.bu.Bind(wx.EVT_BUTTON,lambda x:self.p.layerup())
self.bd.Bind(wx.EVT_BUTTON,lambda x:self.p.layerdown())
self.bi.Bind(wx.EVT_BUTTON,lambda x:self.p.zoom(200,200,1.2))
self.bo.Bind(wx.EVT_BUTTON,lambda x:self.p.zoom(200,200,1/1.2))
s=time.time()
#print time.time()-s