fsleyes_widgets.textpanel¶
This module provides the TextPanel class, for displaying
some text, oriented either horizontally or vertically.
-
class
fsleyes_widgets.textpanel.TextPanel(parent, text=None, orient=4, **kwargs)¶ Bases:
wx._core.PanelA
wx.PyPanelwhich may be used to display a string of text, oriented either horizotnally or vertically.Create a
TextPanel.Parameters: - parent – The
wxparent object. - text – The text to display. This can be changed via
SetText(). - orient – Text orientation - either
wx.HORIZONTAL(the default) orwx.VERTICAL. This can be changed later viaSetOrient().
All other arguments are passed through to
wx.Panel.__init__.-
__init__(parent, text=None, orient=4, **kwargs)¶ Create a
TextPanel.Parameters: - parent – The
wxparent object. - text – The text to display. This can be changed via
SetText(). - orient – Text orientation - either
wx.HORIZONTAL(the default) orwx.VERTICAL. This can be changed later viaSetOrient().
All other arguments are passed through to
wx.Panel.__init__.- parent – The
-
SetOrient(orient)¶ Sets the orientatino of the text on this
TextPanel.Parameters: orient – Either wx.HORIZONTALorwx.VERTICAL.
-
DoGetBestClientSize()¶ Returns the best (minimum) size for this
TextPanel.
-
SetLabel(text)¶ Sets the text shown on this
TextPanel.
-
Draw(ev=None)¶ Draws this
TextPanel.
-
_TextPanel__onSize(ev)¶ Called when this
TextPanelis resized. Triggers a refresh.
-
__module__= 'fsleyes_widgets.textpanel'¶
- parent – The