Salut à tous j'ai encore un petit soucis cette fois-ci avec un BitmapButton

Voici mon code

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
 
          self.imageFileDownload = 'StatusDownload.gif'
          self.gif1 = wx.Image(self.imageFileDownload, wx.BITMAP_TYPE_ANY).ConvertToBitmap()
          # bitmap upper left corner is in the position tuple (x, y) = (5, 5)
          self.btnstatus = wx.BitmapButton(self, -1, self.gif1, (420 + self.gif1.GetWidth(), 300), (32, 32), style = wx.NO_BORDER)
          self.btnstatus.Bind(wx.EVT_BUTTON, self.OnDownload)
 
          self.imageFileDownload = './download.jpg'
          self.gif1 = wx.Image(self.imageFileDownload, wx.BITMAP_TYPE_ANY).ConvertToBitmap()
          # bitmap upper left corner is in the position tuple (x, y) = (5, 5)
          self.btndownload = wx.BitmapButton(self, -1, self.gif1, (445 + self.gif1.GetWidth(), 300), (32, 32),wx.BU_AUTODRAW)
          self.btndownload.Bind(wx.EVT_BUTTON, self.OnDownload)
          self.btndownload.Enable()
          self.btndownload.SetDefault()
 
def OnDownload(self, event):
          status="coucou"
          print status
Rien ne se passe quand je clique un des 2 boutons