User Interface
User interface utility.
Quick Facts
| Property | Value |
|---|---|
| Class | UserInterface |
| Module | cenpylib.UserInterface |
| Package | cenpylib |
| Release | R2025.2.4 |
| Methods | 8 |
| Inherits from | Tk |
Inheritance
Quick Start
# Boilerplate Example
obj = UserInterface(title, width, height, resizeWidth, resizeHeight)Method Index
| Method | Returns | Summary |
|---|---|---|
__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:
| Name | Type | Description |
|---|---|---|
title | — | — |
width | — | — |
height | — | — |
resizeWidth | — | — (default: False) |
resizeHeight | — | — (default: False) |
Mutation Methods
AddFrame
def AddFrame(window)Add a Frame to the given window.
Parameters:
| Name | Type | Description |
|---|---|---|
window | — | — |
AddButton
def AddButton(window, text, width, height, function)Add a Button to the given window with the specified parameters.
Parameters:
| Name | Type | Description |
|---|---|---|
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:
| Name | Type | Description |
|---|---|---|
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:
| Name | Type | Description |
|---|---|---|
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:
| Name | Type | Description |
|---|---|---|
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:
| Name | Type | Description |
|---|---|---|
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:
| Name | Type | Description |
|---|---|---|
window | — | — |
orient | — | — |
function | — | — |
Version Notes
This class is documented as of release R2025.2.4.
Was this page helpful?