Page Contents

This Page

Label

class enaml.widgets.label.Label(parent=None, **kwargs)[source]

Bases: enaml.widgets.control.Control

A simple control for displaying read-only text.

text = None

The text for the label.

align = None

The horizontal alignment of the text in the widget area.

vertical_align = None

The vertical alignment of the text in the widget area.

hug_width = None

How strongly a component hugs it’s content. Labels hug their contents’ width weakly by default.

snapshot()[source]

Returns the dict of creation attributes for the control.

bind()[source]

A method called after initialization which allows the widget to bind any event handlers necessary.

__implements__

alias of __NoInterface__

Backends

Qt

Inheritance diagram of enaml.qt.qt_label.QtLabel

class enaml.qt.qt_label.QtLabel(object_id, parent, session)[source]

Bases: enaml.qt.qt_control.QtControl

A Qt implementation of an Enaml Label.

create_widget(parent, tree)[source]

Create the underlying label widget.

create(tree)[source]

Create and initialize the underlying widget.

on_action_set_text(content)[source]

Handle the ‘set_text’ action from the Enaml widget.

on_action_set_align(content)[source]

Handle the ‘set_align’ action from the Enaml widget.

on_action_set_vertical_align(content)[source]

Handle the ‘set_vertical_align’ action from the Enaml widget.

set_text(text)[source]

Set the text in the underlying widget.

set_align(align)[source]

Set the alignment of the text in the underlying widget.

set_vertical_align(align)[source]

Set the vertical alignment of the text in the underlying widget.

Wx

Inheritance diagram of enaml.wx.wx_label.WxLabel

class enaml.wx.wx_label.WxLabel(object_id, parent, session)[source]

Bases: enaml.wx.wx_control.WxControl

A Wx implementation of an Enaml Label.

create_widget(parent, tree)[source]

Create the underlying wx.StaticText widget.

create(tree)[source]

Create and initialize the label control.

on_action_set_text(content)[source]

Handle the ‘set_text’ action from the Enaml widget.

on_action_set_align(content)[source]

Handle the ‘set_align’ action from the Enaml widget.

on_action_set_vertical_align(content)[source]

Handle the ‘set_vertical_align’ action from the Enaml widget.

set_text(text)[source]

Set the text in the underlying widget.

set_align(align)[source]

Set the alignment of the text in the underlying widget.

set_vertical_align(align)[source]

Set the vertical alignment of the text in the underlying widget.