Gui
This module contains the Panel class for creating GUI panels.
CLASS | DESCRIPTION |
---|---|
Panel |
Panel class for creating GUI panels. |
Documentation last updated: 2025-02-22
Panel
Panel(principal: Proxy | Any | None = None)
Panel class for creating GUI panels.
ATTRIBUTE | DESCRIPTION |
---|---|
principal |
The principal object bound to the Panel.
TYPE:
|
object_id |
The ID of the principal object.
TYPE:
|
title |
The title of the Panel.
TYPE:
|
drawn |
A flag indicating if the Panel is drawn.
TYPE:
|
top_level |
A flag indicating if the Panel is a top-level window.
TYPE:
|
widget |
The tkinter.Tk object bound to the Panel.
TYPE:
|
sub_panels |
A dictionary of sub-panels.
TYPE:
|
stream_update_callbacks |
A list of stream update callbacks.
TYPE:
|
METHOD | DESCRIPTION |
---|---|
bindObject |
Bind a principal object to the Panel. |
releaseObject |
Release the principal object from the Panel. |
bindWidget |
Bind a tkinter.Tk object to the Panel. |
releaseWidget |
Release the tkinter.Tk object from the Panel. |
show |
Show the Panel. |
close |
Close the Panel. |
getAttribute |
Get an attribute from the principal object. |
getAttributes |
Get multiple attributes from the principal object. |
execute |
Execute a method from the principal object. |
addPack |
Add a Panel to the layout using the pack geometry manager. |
addGrid |
Add a Panel to the layout using the grid geometry manager. |
addPanel |
Add a Panel to the layout. |
clearPanels |
Clear all the Panels from the layout. |
updateStream |
Update the Panel continuously. |
update |
Update the Panel values. |
refresh |
Refresh the Panel layout. |
addTo |
Add the Panel to a tkinter.Tk or tkinter.Frame object. |
Initialize a Panel object.
PARAMETER | DESCRIPTION |
---|---|
principal
|
The principal object to bind to the Panel.
TYPE:
|
addGrid
addGrid(panel: Panel, **kwargs)
Add a Panel to the layout using the grid geometry manager.
PARAMETER | DESCRIPTION |
---|---|
panel
|
The Panel to add.
TYPE:
|
**kwargs
|
The keyword arguments to pass to the grid
TYPE:
|
addPack
addPack(panel: Panel, **kwargs)
Add a Panel to the layout using the pack geometry manager.
PARAMETER | DESCRIPTION |
---|---|
panel
|
The Panel to add.
TYPE:
|
**kwargs
|
The keyword arguments to pass to the pack geometry manager.
TYPE:
|
addPanel
addPanel(mode: str, panel: Panel, **kwargs)
Add a Panel to the layout.
PARAMETER | DESCRIPTION |
---|---|
mode
|
The geometry manager to use.
TYPE:
|
panel
|
The Panel to add.
TYPE:
|
**kwargs
|
The keyword arguments to pass to the geometry manager.
TYPE:
|
addTo
Add the Panel to a tkinter.Tk or tkinter.Frame object.
PARAMETER | DESCRIPTION |
---|---|
master
|
The tkinter.Tk or tkinter.Frame object to add the Panel to.
TYPE:
|
size
|
The size of the Panel.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
tuple[int, int] | None
|
tuple[int,int]|None: The size of the Panel or None if an error occurred. |
bindObject
bindObject(principal: Proxy | Any)
Bind a principal object to the Panel.
PARAMETER | DESCRIPTION |
---|---|
principal
|
The principal object to bind to the Panel.
TYPE:
|
bindWidget
Bind a tkinter.Tk object to the Panel.
PARAMETER | DESCRIPTION |
---|---|
widget
|
The tkinter.Tk object to bind to the Panel.
TYPE:
|
execute
Execute a method from the principal object.
PARAMETER | DESCRIPTION |
---|---|
method
|
The method to execute.
TYPE:
|
*args
|
The positional arguments to pass to the method.
TYPE:
|
**kwargs
|
The keyword arguments to pass to the method.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
Any | None
|
Any|None: The output of the method or None if an error occurred. |
getAttribute
Get an attribute from the principal object.
PARAMETER | DESCRIPTION |
---|---|
attribute
|
The attribute to get.
TYPE:
|
default
|
The default value to return if the attribute is not found.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
Any | None
|
Any|None: The value of the attribute or the default value. |
getAttributes
Get multiple attributes from the principal object.
PARAMETER | DESCRIPTION |
---|---|
*attr_defaults
|
The attributes to get and their default values.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
dict[str, Any]
|
dict[str,Any]: A dictionary of the attributes and their values. |
releaseObject
releaseObject() -> Proxy | Any
Release the principal object from the Panel.
RETURNS | DESCRIPTION |
---|---|
Proxy | Any
|
Proxy|Any: The principal object that was released. |
releaseWidget
Release the tkinter.Tk object from the Panel.
RETURNS | DESCRIPTION |
---|---|
Tk | None
|
tk.Tk|None: The tkinter.Tk object that was released. |
show
Show the Panel.
PARAMETER | DESCRIPTION |
---|---|
title
|
The title of the Panel.
TYPE:
|