Changeset 4008

Show
Ignore:
Timestamp:
05/30/07 11:07:27 (6 years ago)
Author:
DrewCormier
Message:

Added button

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • experimental/components/image_display/trunk/image_display/image_display.py

    r3947 r4008  
    142142        print "Frame __init__ called" 
    143143 
    144         temp = image.ConvertToBitmap() 
     144        self.title = title 
     145        self.image = image 
     146        self.pos = pos 
     147 
     148 
     149        temp = self.image.ConvertToBitmap() 
    145150        size = temp.GetWidth(), temp.GetHeight()   
    146         wx.Frame.__init__(self, parent, id, title, pos, size) 
     151        #self.Bind(wx.EVT_MOTION, self.OnMotion) 
     152 
     153 
     154        wx.Frame.__init__(self, parent, id, self.title, wx.DefaultPosition, size) 
    147155        self.bmp = wx.StaticBitmap(parent=self, bitmap = temp) 
    148156 
    149         self.Bind(wx.EVT_MOTION, self.OnMotion) 
     157 
     158        self._init_ctrls(parent) 
     159 
     160    def _init_ctrls(self, parent): 
     161 
     162 
     163        self.StartBtn = wx.Button(id= -1, label= "Start", name= "StartBtn",  
     164            parent= self, pos= wx.Point(1,1), size= wx.Size(165, 50)) 
     165        self.StartBtn.Bind(wx.EVT_BUTTON, self.OnStartBtnButton, id = -1) 
    150166 
    151167    def refresh(self, image): 
     
    154170        self.bmp = wx.StaticBitmap(parent=self, bitmap = temp) 
    155171 
    156     def OnMotion(self, event): 
     172    #def OnMotion(self, event): 
     173    def OnStartBtnButton(self, event): 
    157174        print "initializing the orb\n" 
    158175        #initialize the orb: originally done in __name__ = "__main__" method 
    159176        orb = ORB_Init(uuid, label) 
     177        event.Skip() 
    160178 
    161179