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.
AddFrameAdd a Frame to the given window.
AddButtonAdd a Button to the given window with the specified parameters.
AddDropDownListAdd a drop-down list to the given window with the specified parameters.
AddLabelAdd a Label to the given window with the specified parameters.
AddTextBoxAdd a simple TextBox entry to the given window with the specified parameters.
AddMultilineTextBoxAdd a multiline TextBox entry to the given window with the specified parameters.
AddScrollbarAdd 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 R2025.2.4.

Was this page helpful?