Label (hwx.gui)#
- class Label(text='', **kwds)#
Bases:
Widget
# Name
Type
property
property
property
property
# Name
Description
Text
(self) -> ‘uiString’Example
from hwx import gui # Creating labels allows for changing the font size/characteristics # Also allows for specifying icons. The below icon is in the install. text = gui.Label("Display text", font=dict(size=14, bold=True, italic=True)) icon = gui.Label(icon="msobjbrowser.png") label = gui.Label("Display World", icon="msobjbrowser.png", font=dict(size=14, bold=True, italic=True)) frame = gui.GridFrame( children=( ("Text label -> ", text), ("Icon label -> ", icon), ("Text and Icon label -> ", label) ) ) show(frame)
- class Align(value)#
Bases:
Enum
An enumeration.
# Name
Type
Bottom
Align
Center
Align
HCenter
Align
Left
Align
Right
Align
Top
Align
VCenter
Align
- property text: uiString#
The text to display.
- property margin: int#
The text to display.
- property icon#
The name of icon file to display.
- property alignment#
The alignment of the Label, it can be