Ejemplo n.º 1
0
 def _RegisterImage(self,
                    name,
                    image,
                    maskcolor='white',
                    hotx=None,
                    hoty=None):
     """ Register a wx.Image as a cursor. """
     if sys.platform == 'win32':
         #cursors fixed size 32,32
         xratio = image.GetWidth() / 32
         yratio = image.GetHeight() / 32
     else:
         xratio = yratio = 1
     if not image.HasMask():
         c = colordb.convert_color(maskcolor)
         image.SetMaskColour(c[0], c[1], c[2])
     if not hotx:
         hotx = image.GetWidth() / 2
     hotx = hotx / xratio
     image.SetOptionInt(wx.IMAGE_OPTION_CUR_HOTSPOT_X, hotx)
     if not hoty:
         hoty = image.GetHeight() / 2
     hoty = hoty / yratio
     image.SetOptionInt(wx.IMAGE_OPTION_CUR_HOTSPOT_Y, hoty)
     self.custom[name] = wx.CursorFromImage(image)
Ejemplo n.º 2
0
 def _RegisterImage(self, name, image, maskcolor='white', hotx=None, hoty=None):
     """ Register a wx.Image as a cursor. """
     if sys.platform =='win32':
         #cursors fixed size 32,32
         xratio = image.GetWidth() / 32
         yratio = image.GetHeight() / 32
     else:
         xratio = yratio = 1
     if not image.HasMask():
         c = colordb.convert_color(maskcolor)
         image.SetMaskColour(c[0], c[1], c[2])
     if not hotx:
         hotx = image.GetWidth() / 2
     hotx = hotx / xratio
     image.SetOptionInt(wx.IMAGE_OPTION_CUR_HOTSPOT_X, hotx)
     if not hoty:
         hoty = image.GetHeight() / 2
     hoty = hoty / yratio
     image.SetOptionInt(wx.IMAGE_OPTION_CUR_HOTSPOT_Y, hoty)
     self.custom[name] = wx.CursorFromImage(image)
Ejemplo n.º 3
0
 def SetBackgroundColour(self, color):
     color = colordb.convert_color(color)
     real_SetBackgroundColour(self, color)
Ejemplo n.º 4
0
 def SetItemTextColor(self, idx, color):
     color = colordb.convert_color(color)
     wx.ListCtrl.SetItemTextColour(self, idx, color)
Ejemplo n.º 5
0
 def SetItemBackgroundColor(self, idx, color):
     color = colordb.convert_color(color)
     wx.ListCtrl.SetItemBackgroundColour(self, idx, color)
Ejemplo n.º 6
0
 def SetItemTextColor(self, idx, color):
     color = colordb.convert_color(color)
     wx.ListCtrl.SetItemTextColour(self, idx, color)
Ejemplo n.º 7
0
 def SetItemBackgroundColor(self, idx, color):
     color = colordb.convert_color(color)
     wx.ListCtrl.SetItemBackgroundColour(self, idx, color)