Skip to Content

User Interface

User interface utility.

Quick Facts

PropertyValue
ClassUserInterface
Modulecenpylib.UserInterface
Packagecenpylib
ReleaseR2025.2.4
Methods8
Inherits fromTk

Inheritance

Quick Start

# Boilerplate Example obj = UserInterface(title, width, height, resizeWidth, resizeHeight)

Method Index

MethodReturnsSummary
__init__โ€”Construct a new โ€˜Tkโ€™ object.
AddFrameโ€”Add a Frame to the given window.
AddButtonโ€”Add a Button to the given window with the specified parameters.
AddDropDownListโ€”Add a drop-down list to the given window with the specified parameters.
AddLabelโ€”Add a Label to the given window with the specified parameters.
AddTextBoxโ€”Add a simple TextBox entry to the given window with the specified parameters.
AddMultilineTextBoxโ€”Add a multiline TextBox entry to the given window with the specified parameters.
AddScrollbarโ€”Add a Scrollbar to the given window witht the specified parameters.

Lifecycle

__init__

def __init__(title, width, height, resizeWidth=False, resizeHeight=False)

Construct a new โ€˜Tkโ€™ object.

Create an empty UI window with the given title and parameters in E2 style.

Parameters:

NameTypeDescription
titleโ€”โ€”
widthโ€”โ€”
heightโ€”โ€”
resizeWidthโ€”โ€” (default: False)
resizeHeightโ€”โ€” (default: False)

Mutation Methods

AddFrame

def AddFrame(window)

Add a Frame to the given window.

Parameters:

NameTypeDescription
windowโ€”โ€”

AddButton

def AddButton(window, text, width, height, function)

Add a Button to the given window with the specified parameters.

Parameters:

NameTypeDescription
windowโ€”โ€”
textโ€”โ€”
widthโ€”โ€”
heightโ€”โ€”
functionโ€”โ€”

AddDropDownList

def AddDropDownList(window, variable, default, listValues, width, height, function)

Add a drop-down list to the given window with the specified parameters.

Parameters:

NameTypeDescription
windowโ€”โ€”
variableโ€”โ€”
defaultโ€”โ€”
listValuesโ€”โ€”
widthโ€”โ€”
heightโ€”โ€”
functionโ€”โ€”

AddLabel

def AddLabel(window, text, width, height, function)

Add a Label to the given window with the specified parameters.

Parameters:

NameTypeDescription
windowโ€”โ€”
textโ€”โ€”
widthโ€”โ€”
heightโ€”โ€”
functionโ€”โ€”

AddTextBox

def AddTextBox(window, variable, readonly=False)

Add a simple TextBox entry to the given window with the specified parameters.

Parameters:

NameTypeDescription
windowโ€”โ€”
variableโ€”โ€”
readonlyโ€”โ€” (default: False)

AddMultilineTextBox

def AddMultilineTextBox(window, text, width, height, readonly=False)

Add a multiline TextBox entry to the given window with the specified parameters.

Parameters:

NameTypeDescription
windowโ€”โ€”
textโ€”โ€”
widthโ€”โ€”
heightโ€”โ€”
readonlyโ€”โ€” (default: False)

AddScrollbar

def AddScrollbar(window, orient, function)

Add a Scrollbar to the given window witht the specified parameters.

Parameters:

NameTypeDescription
windowโ€”โ€”
orientโ€”โ€”
functionโ€”โ€”

Version Notes

This class is documented as of release R2026.1.1.

Was this page helpful?