Page Contents

This Page

TextEditor

class enaml.widgets.text_editor.TextEditor(parent=None, **kwargs)[source]

Bases: enaml.widgets.control.Control

A simple control for displaying read-only text.

text = None

The text for the text editor

mode = None

The editing mode for the editor

theme = None

The theme for the editor

auto_pair = None

Auto pairs parentheses, braces, etc

font_size = None

The editor’s font size

margin_line = None

Display the margin line

margin_line_column = None

The column number for the margin line

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_text_editor.QtTextEditor

class enaml.qt.qt_text_editor.QtTextEditor(object_id, parent, session)[source]

Bases: enaml.qt.qt_control.QtControl

A Qt4 implementation of an Enaml TextEditor.

create()[source]

Create the underlying widget.

initialize(attrs)[source]

Initialize the widget’s attributes.

on_load()[source]

The attributes have to be set after the webview has finished loading, so this function is delayed

on_message_set_text(payload)[source]

Handle the ‘set-text’ action from the Enaml widget.

on_message_set_theme(payload)[source]

Handle the ‘set-theme’ action from the Enaml widget.

on_message_set_mode(payload)[source]

Handle the ‘set-mode’ action from the Enaml widget.

on_message_set_auto_pair(payload)[source]

Handle the ‘set-auto_pair’ action from the Enaml widget.

on_message_set_font_size(payload)[source]

Handle the ‘set-font_size’ action from the Enaml widget.

on_message_show_margin_line(payload)[source]

Handle the ‘show-margin_line’ action from the Enaml widget.

on_message_set_margin_line_column(payload)[source]

Handle the ‘set-margin_line_column’ action from the Enaml widget.

set_text(text)[source]

Set the text in the underlying widget.

set_theme(theme)[source]

Set the theme of the underlying editor.

set_mode(mode)[source]

Set the mode of the underlying editor.

set_auto_pair(auto_pair)[source]

Set whether or not to pair parentheses, braces, etc in the editor

set_font_size(font_size)[source]

Set the font size of the editor

show_margin_line(margin_line)[source]

Set whether or not to display the margin line in the editor

set_margin_line_column(margin_line_col)[source]

Set the column number for the margin line

Wx