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)
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)
def SetBackgroundColour(self, color): color = colordb.convert_color(color) real_SetBackgroundColour(self, color)
def SetItemTextColor(self, idx, color): color = colordb.convert_color(color) wx.ListCtrl.SetItemTextColour(self, idx, color)
def SetItemBackgroundColor(self, idx, color): color = colordb.convert_color(color) wx.ListCtrl.SetItemBackgroundColour(self, idx, color)
def SetItemTextColor(self, idx, color): color = colordb.convert_color(color) wx.ListCtrl.SetItemTextColour(self, idx, color)
def SetItemBackgroundColor(self, idx, color): color = colordb.convert_color(color) wx.ListCtrl.SetItemBackgroundColour(self, idx, color)