def __init__(self, parent, text='', fontname=None): Box.__init__(self, parent) BaseText.__init__(self, text, fontname) # no edge self.edgeWidth = 0 # init position (this is to set the size) self.position = 10,10,100,16 # we need to know about position changes to update alignment self.eventPosition.Bind(self._PositionText)
def __init__(self, parent, text='', fontName=None, fontSize=9, color='k'): Box.__init__(self, parent) BaseText.__init__(self, text, fontName, fontSize, color) # no edge self.edgeWidth = 0 # init position (this is to set the size) self.position = 10, 10, 100, 16 # we need to know about position changes to update alignment self.eventPosition.Bind(self.UpdatePosition)
def __init__(self, parent, text="", fontName=None, fontSize=9, color="k"): Box.__init__(self, parent) BaseText.__init__(self, text, fontName, fontSize, color) # no edge self.edgeWidth = 0 # init position (this is to set the size) self.position = 10, 10, 100, 16 # we need to know about position changes to update alignment self.eventPosition.Bind(self.UpdatePosition)
def __init__(self, parent, text='', fontname=None): Box.__init__(self, parent) BaseText.__init__(self, text, fontname) # no edge self.edgeWidth = 0 # init position (this is to set the size) self.position = 10, 10, 100, 16 # we need to know about position changes to update alignment self.eventPosition.Bind(self._PositionText)
def __init__(self, parent, *args, **kwargs): # check that the parent is a Figure if not isinstance(parent, _BaseFigure): raise Exception("The given parent for an AxesContainer " + "should be a Figure.") # Init box Box.__init__(self, parent, *args, **kwargs) # Init position self.position = 0, 0, 1, 1 # Set properties self.edgeWidth = 0 self.bgcolor = None
def __init__(self, parent, *args, **kwargs): # check that the parent is a Figure if not isinstance(parent, _BaseFigure): raise Exception("The given parent for an AxesContainer " + "should be a Figure.") # Init box Box.__init__(self, parent, *args, **kwargs) # Init position self.position = 0,0,1,1 # Set properties self.edgeWidth = 0 self.bgcolor = None
def OnDraw(self): # Draw the box Box.OnDraw(self) # Draw the text self._DrawText()
def OnDraw(self): # Draw the box Box.OnDraw(self) # Draw the text fm = self._GetFontManager() if fm: fm.Draw(self)