def __init__(self, parent, bitmap, drawDropArrow=False, hoverBitmap=None, drawHoverBox=True, style=wx.NO_BORDER): self.bitmap = bitmap self.disabledBitmap = None self.hoverBitmap = hoverBitmap self.drawHoverBox = drawHoverBox self.drawDropArrow = drawDropArrow self.borderColor = getDefaultControlBorderColor() self.hoverBackgroundColor = wx.Color(254, 225, 119) self.clickBackgroundColor = wx.Color(251, 209, 61) wx.PyControl.__init__(self, parent, wx.ID_ANY, style=style) ZClickableControlMixin.__init__(self) ZHoverableControlMixin.__init__(self) self.Bind(wx.EVT_PAINT, self.onPaint, self) self.Bind(wx.EVT_ERASE_BACKGROUND, self.onEraseBackground, self) sizeW = self.bitmap.GetWidth() sizeH = self.bitmap.GetHeight() if self.drawHoverBox or self.drawDropArrow: sizeW += 4 sizeH += 4 self.SetSizeHints(sizeW, sizeH)
def __init__(self, parent, text, description, bitmaps, hoverBitmaps, disabledBitmaps, node): self.text = text self.description = description self.bitmaps = bitmaps self.hoverBitmaps = hoverBitmaps self.disabledBitmaps = disabledBitmaps self.node = node self.showTextFlag = True self.toolBitmapSize = 16 wx.PyControl.__init__(self, parent, wx.ID_ANY, style=wx.NO_BORDER) ZClickableControlMixin.__init__(self, False) ZHoverableControlMixin.__init__(self) self.SetFont(getDefaultFont()) self.SetToolTipString(self.description) self._resize() self.Bind(wx.EVT_PAINT, self.onPaint, self) self.Bind(wx.EVT_ERASE_BACKGROUND, self.onEraseBackground, self)
def __init__(self, parent, bitmap, toggledBitmap=None, style=wx.NO_BORDER): self.bitmap = bitmap self.disabledBitmap = None self.toggledBitmap = toggledBitmap self.disabledToggledBitmap = None self.toggled = False self.borderColor = getDefaultControlBorderColor() self.toggledBorderColor = getDefaultControlBorderColor() self.hoverBackgroundColor = wx.Color(254, 225, 119) self.clickBackgroundColor = wx.Color(251, 209, 61) self.toggledBackgroundColor = wx.Color(249, 249, 249) wx.PyControl.__init__(self, parent, wx.ID_ANY, style=style) ZClickableControlMixin.__init__(self) ZHoverableControlMixin.__init__(self) self.Bind(wx.EVT_PAINT, self.onPaint, self) self.Bind(wx.EVT_ERASE_BACKGROUND, self.onEraseBackground, self) sizeW = self.bitmap.GetWidth() + 4 sizeH = self.bitmap.GetHeight() + 4 self.SetSizeHints(sizeW, sizeH)
def __init__(self, parent, bitmap, toggledBitmap = None, style = wx.NO_BORDER): self.bitmap = bitmap self.disabledBitmap = None self.toggledBitmap = toggledBitmap self.disabledToggledBitmap = None self.toggled = False self.borderColor = getDefaultControlBorderColor() self.toggledBorderColor = getDefaultControlBorderColor() self.hoverBackgroundColor = wx.Color(254, 225, 119) self.clickBackgroundColor = wx.Color(251, 209, 61) self.toggledBackgroundColor = wx.Color(249, 249, 249) wx.PyControl.__init__(self, parent, wx.ID_ANY, style = style) ZClickableControlMixin.__init__(self) ZHoverableControlMixin.__init__(self) self.Bind(wx.EVT_PAINT, self.onPaint, self) self.Bind(wx.EVT_ERASE_BACKGROUND, self.onEraseBackground, self) sizeW = self.bitmap.GetWidth() + 4 sizeH = self.bitmap.GetHeight() + 4 self.SetSizeHints(sizeW, sizeH)
def __init__(self, parent, bitmap, drawDropArrow = False, hoverBitmap = None, drawHoverBox = True, style = wx.NO_BORDER): self.bitmap = bitmap self.disabledBitmap = None self.hoverBitmap = hoverBitmap self.drawHoverBox = drawHoverBox self.drawDropArrow = drawDropArrow self.borderColor = getDefaultControlBorderColor() self.hoverBackgroundColor = wx.Color(254, 225, 119) self.clickBackgroundColor = wx.Color(251, 209, 61) wx.PyControl.__init__(self, parent, wx.ID_ANY, style = style) ZClickableControlMixin.__init__(self) ZHoverableControlMixin.__init__(self) self.Bind(wx.EVT_PAINT, self.onPaint, self) self.Bind(wx.EVT_ERASE_BACKGROUND, self.onEraseBackground, self) sizeW = self.bitmap.GetWidth() sizeH = self.bitmap.GetHeight() if self.drawHoverBox or self.drawDropArrow: sizeW += 4 sizeH += 4 self.SetSizeHints(sizeW, sizeH)
def __init__(self, parent, text, description, bitmap, hoverBitmap, selectedBitmap, data): self.parent = parent self.text = text self.description = description self.bitmap = bitmap self.hoverBitmap = hoverBitmap self.selectedBitmap = selectedBitmap self.data = data self.selected = False self.selectedBackgroundColor = wx.Color(200, 200, 225) self.hoverBackgroundColor = wx.Color(225, 225, 250) wx.PyControl.__init__(self, parent, wx.ID_ANY, style = wx.NO_BORDER) ZClickableControlMixin.__init__(self, False) ZHoverableControlMixin.__init__(self) self.SetFont(getDefaultFont()) self._resize() self.Bind(wx.EVT_PAINT, self.onPaint, self) self.Bind(wx.EVT_ERASE_BACKGROUND, self.onEraseBackground, self)
def __init__(self, parent): self.parent = parent wx.PyControl.__init__(self, parent, wx.ID_ANY, style = wx.NO_BORDER) ZHoverableControlMixin.__init__(self)
def __init__(self, parent): self.parent = parent wx.PyControl.__init__(self, parent, wx.ID_ANY, style=wx.NO_BORDER) ZHoverableControlMixin.__init__(self)