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.Panel
A
wx.PyPanel
which may be used to display a string of text, oriented either horizotnally or vertically.Create a
TextPanel
.- Parameters
parent – The
wx
parent 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
wx
parent 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__
.
-
SetOrient
(orient)¶ Sets the orientatino of the text on this
TextPanel
.- Parameters
orient – Either
wx.HORIZONTAL
orwx.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
TextPanel
is resized. Triggers a refresh.
-
__module__
= 'fsleyes_widgets.textpanel'¶