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)[source]

Bases: Panel

A wx.PyPanel which may be used to display a string of text, oriented either horizontally 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) or wx.VERTICAL. This can be changed later via SetOrient().

All other arguments are passed through to wx.Panel.__init__ .

SetOrient(orient)[source]

Sets the orientatino of the text on this TextPanel.

Parameters:

orient – Either wx.HORIZONTAL or wx.VERTICAL.

DoGetBestClientSize()[source]

Returns the best (minimum) size for this TextPanel.

SetLabel(text)[source]

Sets the text shown on this TextPanel.

Draw(ev=None)[source]

Draws this TextPanel.