navigate.view.custom_widgets.popup.PopUp
- class navigate.view.custom_widgets.popup.PopUp(root: Tk, name: str, size: str, top: bool = True, transient: bool = True, *args, **kwargs)
Bases:
ToplevelGeneric Popup Window class
Creates the popup window based on the root window being passed, title that you want the window to have and the size of the window. Some important things to consider: - Root has to be the main application window to work - Name has to be a string - Size also has to be a string in the format ‘600x400+320+180’ - 600x400 represents the pixel size - +320 means 320 pixels from left edge, +180 means 180 pixels from top edge. - If a ‘-’ is used instead of ‘+’ it will be from the opposite edge. - Top is a boolean that if true means popup will always be on top of other windows - Transient is a boolean that if true means the main app will not be usable until popup is closed - The parent frame for any widgets you add to the popup will be retrieved with the get_frame() function
https://stackoverflow.com/questions/28560209/transient-input-window Above link is a resource for using popups. Some helpful tips of an easy way to access the data inputted by a user into the popup Also discusses transience of a popup (whether you can click out of the popup)
- __init__(root: Tk, name: str, size: str, top: bool = True, transient: bool = True, *args, **kwargs) → None
Initialize Generic Popup Window class
- Parameters:
root (tk.Tk) – The main application window
name (str) – The title of the popup window
size (str) – The size of the popup window in the format ‘600x400+320+180’ where it is width x height + x_offset + y_offset.
top (bool, optional) – If true, the popup will always be on top of other windows, by default True
transient (bool, optional) – If true, the main application will not be usable until the popup is closed, by default True
*args – Variable length argument list
**kwargs – Arbitrary keyword arguments
Methods
__init__(root, name, size[, top, transient])Initialize Generic Popup Window class
dismiss()Releases control back to main window from popup
Returns the parent frame for any widgets you add to the popup
showup()Display popup as top-level window.
Attributes
- dismiss() → None
Releases control back to main window from popup
This function is used to release control back to the main window from the popup window.
- get_frame() → Frame
Returns the parent frame for any widgets you add to the popup
This function is used to return the parent frame for any widgets you add to the popup window.
- Returns:
The parent frame for any widgets you add to the popup
- Return type:
ttk.Frame
- showup() → None
Display popup as top-level window.
This function is used to display the popup window as a top-level window.
- content_frame
The parent frame for any widgets you add to the popup
- Type:
ttk.Frame