text_block

class bgui.text_block.TextBlock(parent, name=None, text='', font=None, pt_size=None, color=None, aspect=None, size=[1, 1], pos=[0, 0], sub_theme='', overflow=1, options=0)

Bases: Widget

Widget for displaying blocks of text

Parameters:
  • parent – The widget’s parent

  • name – The name of the widget

  • text – The text to display (this can be changed later via the text property)

  • font – The font to use

  • pt_size – The point size of the text to draw

  • color – The color to use when rendering the font

  • aspect – Constrain the widget size to a specified aspect ratio

  • size – A tuple containing the width and height

  • pos – A tuple containing the x and y position

  • sub_theme – Name of a sub_theme defined in the theme file (similar to CSS classes)

  • overflow – How to handle excess text

  • options – Various other options

theme_section= 'TextBlock'
theme_options= {'LabelSubTheme': ''}
text

The text to display