class TdViewAnnotationPanel(wx.Panel): ''' The view annotation area. This area can be used to plot anotations for the view. This might be some statistic values (e.g. min, max), the axes limits or some other custom info. ''' def __init__(self, parent, size=(200, -1), color=None): wx.Panel.__init__(self, parent, size=size) self.SetBackgroundColour(color) self.SetMinSize((200, -1)) # Create a test label. self.label = StaticText(self, wx.ID_ANY, "view annotation area", (20, 10)) font = wx.Font(8, wx.FONTFAMILY_DEFAULT, wx.NORMAL, wx.NORMAL) self.label.SetFont(font) # Add the label to the sizer. sizer = wx.BoxSizer(wx.HORIZONTAL) sizer.Add(self.label, 1, wx.EXPAND | wx.ALL, border=0) self.SetSizer(sizer) #print label.GetAlignment() def setLabel(self, text): ''' Set the text of the annotation label. ''' self.label.SetLabelText(text) self.label.Refresh()