### TkEasyGUI Window start_thread Example Source: https://github.com/kujirahand/tkeasygui-python/blob/main/docs/TkEasyGUI/widgets-py.md Demonstrates starting a background thread for a long-running process in a TkEasyGUI window. The thread's completion is signaled by an end_key. ```python import TkEasyGUI as eg # long-running process sample def long_running_process(wait): print("sleep start") time.sleep(wait) return f"done {wait}" # create a window with eg.Window("threading", layout=[[eg.Button("Run")]]) as window: # event loop for event, values in window.event_iter(): if event == "Run": window.start_thread(long_running_process, end_key="-threadend-", wait=3) if event == "-threadend-": result = values["-threadend-"] eg.print("Thread end", result) ``` -------------------------------- ### TkEasyGUI TabGroup Example Source: https://github.com/kujirahand/tkeasygui-python/blob/main/docs/TkEasyGUI/widgets-py.md Demonstrates how to create and use a TabGroup with multiple tabs, each containing its own layout and elements. This example shows setting up tabs, a window, and an event loop. ```python import TkEasyGUI as sg # Tab's Layout tab1_layout = [[sg.Text("Tab1")], [sg.Input(key="input1")], [sg.Button("Read1")]] tab2_layout = [[sg.Text("Tab2")], [sg.Input(key="input2")], [sg.Button("Read2")]] # Main Layout layout = [[\ sg.TabGroup([[\ sg.Tab("Tab title1", tab1_layout), sg.Tab("Tab title2", tab2_layout), ]])], [sg.Button("Quit")]] # create window and event loop with sg.Window("Tab Demo", layout) as window: for event, values in window: pass ``` -------------------------------- ### Install Development Dependencies and Lint Code Source: https://github.com/kujirahand/tkeasygui-python/blob/main/docs/dev.md Run these commands to install the necessary development dependencies and then lint the codebase to ensure code quality and consistency. ```sh meke install-dev make lint ``` -------------------------------- ### Install TkEasyGUI from GitHub Source: https://github.com/kujirahand/tkeasygui-python/blob/main/README.md Install the TkEasyGUI package directly from its GitHub repository. This is useful for development or when needing the latest unreleased features. ```sh python -m pip install git+https://github.com/kujirahand/tkeasygui-python ``` ```sh # Clone the repository and install git clone https://github.com/kujirahand/tkeasygui-python cd tkeasygui-python python -m pip install . ``` -------------------------------- ### TkEasyGUI popup_get_form Simple Example Source: https://github.com/kujirahand/tkeasygui-python/blob/main/docs/TkEasyGUI/dialogs-py.md A basic example of using popup_get_form to get user input for 'Name' and 'Hobbies'. The returned dictionary contains the entered values. ```Python import TkEasyGUI as eg form = eg.popup_get_form(["Name", "Hobbies"]) if form: name = form["Name"] hobbies = form["Hobbies"] eg.print(f"name={name}, hobbies={hobbies}") ``` -------------------------------- ### Install TkEasyGUI using pip Source: https://github.com/kujirahand/tkeasygui-python/blob/main/README.md Install the TkEasyGUI package from PyPI using pip. This is the recommended method for most users. ```sh pip install TkEasyGUI ``` ```sh python -m pip install TkEasyGUI ``` -------------------------------- ### Get Selection Start Source: https://github.com/kujirahand/tkeasygui-python/blob/main/docs/TkEasyGUI/widgets-py.md Retrieves the starting index of the selected text in the input widget. ```python def get_selection_start(self) -> int: ``` -------------------------------- ### Show TkEasyGUI Installation Path (Shell Command) Source: https://github.com/kujirahand/tkeasygui-python/blob/main/docs/installation_trouble.md Display the installation path for the tkeasygui package. This helps in locating the package directory for manual removal if needed. ```sh python -m pip show tkeasygui ``` -------------------------------- ### Install TkEasyGUI (Shell Command) Source: https://github.com/kujirahand/tkeasygui-python/blob/main/docs/installation_trouble.md Install the tkeasygui package using pip. This is a preliminary check to see if TkEasyGUI can be installed. ```sh python -m pip install tkeasygui ``` -------------------------------- ### Install Latest TkEasyGUI (Shell Command) Source: https://github.com/kujirahand/tkeasygui-python/blob/main/docs/installation_trouble.md Install the latest version of TkEasyGUI after ensuring the old package has been removed. ```sh python -m pip install TkEasyGUI ``` -------------------------------- ### Build Documentation Source: https://github.com/kujirahand/tkeasygui-python/blob/main/docs/dev.md Execute this command to build the project's documentation. Ensure you have the necessary build tools installed. ```sh make build-docs ``` -------------------------------- ### Output.get_selection_start Source: https://github.com/kujirahand/tkeasygui-python/blob/main/docs/TkEasyGUI/widgets-py.md Get the start position of the selection in the Output element. ```APIDOC ## Output.get_selection_start ### Description Get the start position of the selection in the Output element. ### Method GET ### Endpoint /output/selection_start ### Parameters None. ### Response #### Success Response (200) - **start_pos** (int) - The start position of the selection. ``` -------------------------------- ### InputText.get_selection_start Source: https://github.com/kujirahand/tkeasygui-python/blob/main/docs/TkEasyGUI/widgets-py.md Gets the starting index of the selected text in the InputText widget. ```APIDOC ## InputText.get_selection_start ### Description Get selection start ### Method `get_selection_start` ### Parameters None ### Response #### Success Response - **start_index** (int) - The starting index of the selection. ``` -------------------------------- ### Install Pillow on Raspberry Pi Source: https://github.com/kujirahand/tkeasygui-python/blob/main/README.md Use this command to upgrade and reinstall Pillow if needed for Raspberry Pi installations. ```bash pip install --upgrade --force-reinstall pillow ``` -------------------------------- ### FileSaveAsBrowse.prepare_create Source: https://github.com/kujirahand/tkeasygui-python/blob/main/docs/TkEasyGUI/widgets-py.md Prepares the widget for creation, performing any necessary setup before it's added to the window. ```APIDOC ## FileSaveAsBrowse.prepare_create ### Description Prepare to create a widget. ### Method Signature ```python def prepare_create(self, win: Window) -> None: ``` ``` -------------------------------- ### Set Selection Start in TkEasyGUI Multiline Source: https://github.com/kujirahand/tkeasygui-python/blob/main/docs/TkEasyGUI/widgets-py.md Sets the starting index of a text selection and optionally its length. ```python def set_selection_start(self, index: int, sel_length: int = 0) -> None: ``` -------------------------------- ### TkEasyGUI get_themes Function Example Source: https://github.com/kujirahand/tkeasygui-python/blob/main/docs/TkEasyGUI/utils-py.md Demonstrates how to retrieve the list of available theme names using get_themes(). ```python print(get_themes()) ``` -------------------------------- ### Window.start_thread Source: https://github.com/kujirahand/tkeasygui-python/blob/main/docs/TkEasyGUI/widgets-py.md Starts a new thread to execute a target function, with an option to signal completion via an end_key. ```APIDOC ## Window.start_thread ### Description Start a thread. ### Example ```python import TkEasyGUI as eg # long-running process sample def long_running_process(wait): print("sleep start") time.sleep(wait) return f"done {wait}" # create a window with eg.Window("threading", layout=[[eg.Button("Run")]]) as window: # event loop for event, values in window.event_iter(): if event == "Run": window.start_thread(long_running_process, end_key="-threadend-", wait=3) if event == "-threadend-": result = values["-threadend-"] eg.print("Thread end", result) ``` ### Method Signature ```python def start_thread( self, target: Callable, *args, end_key: str = WINDOW_THREAD_END, # the thread processing is complete, end_key will be released **kw, ) -> None: ``` ``` -------------------------------- ### Progressbar.start Source: https://github.com/kujirahand/tkeasygui-python/blob/main/docs/TkEasyGUI/widgets-py.md Starts the indeterminate Progressbar, typically used for unknown durations. ```APIDOC ## Progressbar.start ### Description Starts the indeterminate Progressbar, typically used for unknown durations. ### Method Signature ```python def start(self, interval: int = 100) -> None: ``` ### Parameters * **interval** (int) - The interval in milliseconds for the indeterminate progress, defaults to 100. ``` -------------------------------- ### Menu.get_prev_element Source: https://github.com/kujirahand/tkeasygui-python/blob/main/docs/TkEasyGUI/widgets-py.md Get the previous widget. ```APIDOC ## Menu.get_prev_element ### Description Get the previous widget. ### Method GET (or equivalent for SDK) ### Endpoint /Menu/get_prev_element ### Parameters #### Query Parameters - **target_key** (str or None) - Optional - The key of the target element to find the previous one for. ``` -------------------------------- ### Menu.prepare_create Source: https://github.com/kujirahand/tkeasygui-python/blob/main/docs/TkEasyGUI/widgets-py.md Prepare to create a widget. ```APIDOC ## Menu.prepare_create ### Description Prepare to create a widget. ### Method POST (or equivalent for SDK) ### Endpoint /Menu/prepare_create ### Parameters #### Request Body - **win** (Window) - The window object. ``` -------------------------------- ### Get Selection Start Position in InputText Source: https://github.com/kujirahand/tkeasygui-python/blob/main/docs/TkEasyGUI/widgets-py.md Returns the starting index of the selected text in the InputText widget. Useful for precise text editing. ```python def get_selection_start(self) -> int: pass ``` -------------------------------- ### Input.get_selection_start Source: https://github.com/kujirahand/tkeasygui-python/blob/main/docs/TkEasyGUI/widgets-py.md Retrieves the starting position of the selected text. ```APIDOC ## Input.get_selection_start ### Description Get selection start ### Method ```python def get_selection_start(self) -> int: ``` ``` -------------------------------- ### TkEasyGUI popup_get_file Examples Source: https://github.com/kujirahand/tkeasygui-python/blob/main/docs/TkEasyGUI/dialogs-py.md Demonstrates how to use popup_get_file for opening single files, saving files, selecting multiple files, and filtering by file type. ```Python import TkEasyGUI as eg # select a file to open file_path = eg.popup_get_file("Select a file to open:", "Open File") print(file_path) # select a file to save save_path = eg.popup_get_file("Select a file to save:", "Save File", save_as=True) print(save_path) # select multiple files files = eg.popup_get_file("Select files:", "Open Files", multiple_files=True) files_list = files.split(eg.FILES_DELIMITER) if files else [] eg.popup_listbox(files_list, "Selected Files") # select only text files text_file = eg.popup_get_file("Select a text file:", "Open Text File", file_types=[("Text Files", "*.txt")]) print(text_file) ``` -------------------------------- ### Output.get_selection_pos Source: https://github.com/kujirahand/tkeasygui-python/blob/main/docs/TkEasyGUI/widgets-py.md Get the start and end positions of the selection in the Output element. ```APIDOC ## Output.get_selection_pos ### Description Get the start and end positions of the selection in the Output element. ### Method GET ### Endpoint /output/selection_pos ### Parameters None. ### Response #### Success Response (200) - **start_pos** (int) - The start position of the selection. - **end_pos** (int) - The end position of the selection. ``` -------------------------------- ### Menu.get_bind_dict Source: https://github.com/kujirahand/tkeasygui-python/blob/main/docs/TkEasyGUI/widgets-py.md Get bind dict. ```APIDOC ## Menu.get_bind_dict ### Description Get bind dict. ### Method GET (or equivalent for SDK) ### Endpoint /Menu/get_bind_dict ### Parameters None ### Response #### Success Response - **bind_dict** (dict[str, tuple[str, bool, EventMode]]) - The bind dictionary. ``` -------------------------------- ### Button.prepare_create Source: https://github.com/kujirahand/tkeasygui-python/blob/main/docs/TkEasyGUI/widgets-py.md Prepare to create a widget. ```APIDOC ## Button.prepare_create ### Description Prepare to create a widget. ### Parameters #### Path Parameters - **win** (Window) - Required - Description: The window object. ### Signature ```python def prepare_create(self, win: Window) -> None: ``` ``` -------------------------------- ### Push.prepare_create Source: https://github.com/kujirahand/tkeasygui-python/blob/main/docs/TkEasyGUI/widgets-py.md Prepare to create a widget. ```APIDOC ## Push.prepare_create ### Description Prepare to create a widget. ### Method Signature `prepare_create(self, win: Window) -> None` ``` -------------------------------- ### InputText.get_selection_pos Source: https://github.com/kujirahand/tkeasygui-python/blob/main/docs/TkEasyGUI/widgets-py.md Gets the start and end positions of the selected text in the InputText widget. ```APIDOC ## InputText.get_selection_pos ### Description Get selection positions ### Method `get_selection_pos` ### Parameters None ### Response #### Success Response - **positions** (tuple[int, int]) - A tuple containing the start and end indices of the selection. ``` -------------------------------- ### Get Selection Position Source: https://github.com/kujirahand/tkeasygui-python/blob/main/docs/TkEasyGUI/widgets-py.md Retrieves the start and end positions of the selected text within the input widget. ```python def get_selection_pos(self) -> tuple[int, int]: ``` -------------------------------- ### TkEasyGUI Tab and TabGroup Example Source: https://github.com/kujirahand/tkeasygui-python/blob/main/docs/TkEasyGUI/widgets-py.md Demonstrates the creation and usage of Tab and TabGroup elements in TkEasyGUI to organize content within a window. Includes a basic event loop. ```python import TkEasyGUI as sg # Tab's Layout tab1_layout = [[sg.Text("Tab1")], [sg.Input(key="input1")], [sg.Button("Read1")]] tab2_layout = [[sg.Text("Tab2")], [sg.Input(key="input2")], [sg.Button("Read2")]] # Main Layout layout = [[ \ sg.TabGroup([[ \ sg.Tab("Tab title1", tab1_layout), sg.Tab("Tab title2", tab2_layout), ]])], [sg.Button("Quit")]] # create window and event loop with sg.Window("Tab Demo", layout) as window: for event, values in window: pass ``` -------------------------------- ### ListBrowse.prepare_create Source: https://github.com/kujirahand/tkeasygui-python/blob/main/docs/TkEasyGUI/widgets-py.md Prepares the environment for creating a ListBrowse widget within a given window. ```APIDOC ## ListBrowse.prepare_create ### Description Prepare to create a widget. ### Signature ```python def prepare_create(self, win: Window) -> None: ``` ``` -------------------------------- ### Get Selection Position in TkEasyGUI Multiline Source: https://github.com/kujirahand/tkeasygui-python/blob/main/docs/TkEasyGUI/widgets-py.md Retrieves the start and end positions of the current text selection. The positions are returned as a tuple of strings. ```python def get_selection_pos(self) -> tuple[str, str]: ``` -------------------------------- ### Get Selection Position in InputText Source: https://github.com/kujirahand/tkeasygui-python/blob/main/docs/TkEasyGUI/widgets-py.md Retrieves the start and end positions of the selected text within the InputText widget. Returns a tuple of two integers. ```python def get_selection_pos(self) -> tuple[int, int]: pass ``` -------------------------------- ### Output.prepare_create Source: https://github.com/kujirahand/tkeasygui-python/blob/main/docs/TkEasyGUI/widgets-py.md Prepare for the creation of an Output widget. ```APIDOC ## Output.prepare_create ### Description Prepare to create a widget. ### Method POST ### Endpoint /output/prepare_create ### Parameters #### Request Body - **win** (Window) - The window object. ``` -------------------------------- ### Install Pillow on Raspberry Pi (Alternative) Source: https://github.com/kujirahand/tkeasygui-python/blob/main/README.md If the previous command fails, uninstall the old system version of Pillow and reinstall it. ```bash sudo apt remove python3-pil pip install pillow ``` -------------------------------- ### FolderBrowse.prepare_create Source: https://github.com/kujirahand/tkeasygui-python/blob/main/docs/TkEasyGUI/widgets-py.md Prepares the widget for creation, usually involving the window context. ```APIDOC ## FolderBrowse.prepare_create ### Description Prepare to create a widget. ### Signature ```python def prepare_create(self, win: Window) -> None: ``` ``` -------------------------------- ### Install Tkinter on Raspberry Pi Source: https://github.com/kujirahand/tkeasygui-python/blob/main/README.md Ensure the python3-tk package is installed on Raspberry Pi for Tkinter functionality. ```bash sudo apt-get install python3-tk ``` -------------------------------- ### Tab.prepare_create Source: https://github.com/kujirahand/tkeasygui-python/blob/main/docs/TkEasyGUI/widgets-py.md Prepares the environment before creating the Tab element. ```APIDOC ## Tab.prepare_create ### Description Prepare to create a widget. ### Method POST ### Endpoint ``` Tab.prepare_create(win: Window) ``` ### Parameters #### Path Parameters - **win** (Window) - Required - The Window object. ``` -------------------------------- ### Multiline.get_selection_start Source: https://github.com/kujirahand/tkeasygui-python/blob/main/docs/TkEasyGUI/widgets-py.md Retrieves the starting position of the current selection. ```APIDOC ## Multiline.get_selection_start ### Description Get selection start. ### Method ```python def get_selection_start(self) -> int: ``` ``` -------------------------------- ### Input.prepare_create Source: https://github.com/kujirahand/tkeasygui-python/blob/main/docs/TkEasyGUI/widgets-py.md Prepares the widget for creation. ```APIDOC ## Input.prepare_create ### Description Prepare to create a widget. ### Method ```python def prepare_create(self, win: Window) -> None: ``` ``` -------------------------------- ### Progressbar.prepare_create Source: https://github.com/kujirahand/tkeasygui-python/blob/main/docs/TkEasyGUI/widgets-py.md Prepares for the creation of the Progressbar widget. ```APIDOC ## Progressbar.prepare_create ### Description Prepares for the creation of the Progressbar widget. ### Method Signature ```python def prepare_create(self, win: Window) -> None: ``` ### Parameters * **win** (Window) - The Window object. ``` -------------------------------- ### FileBrowse.prepare_create Source: https://github.com/kujirahand/tkeasygui-python/blob/main/docs/TkEasyGUI/widgets-py.md Prepares the widget for creation within a Window. ```APIDOC ## FileBrowse.prepare_create ### Description Prepares the widget for creation within a Window. ### Method Signature ```python def prepare_create(self, win: Window) -> None: ``` ### Parameters - **win** (Window) - The Window object. ``` -------------------------------- ### Progressbar.prepare_create Method Source: https://github.com/kujirahand/tkeasygui-python/blob/main/docs/TkEasyGUI/widgets-py.md Prepares the necessary data and configurations before creating the Progressbar widget. ```python def prepare_create(self, win: Window) -> None: ... ``` -------------------------------- ### Set Selection Start and Length Source: https://github.com/kujirahand/tkeasygui-python/blob/main/docs/TkEasyGUI/widgets-py.md Sets the starting position and length of a text selection within the input widget. ```python def set_selection_start(self, sel_start: int, sel_length: int = 0) -> None: ``` -------------------------------- ### Input.set_selection_start Source: https://github.com/kujirahand/tkeasygui-python/blob/main/docs/TkEasyGUI/widgets-py.md Sets the starting position and length of a text selection. ```APIDOC ## Input.set_selection_start ### Description Set selection start and length ### Method ```python def set_selection_start(self, sel_start: int, sel_length: int = 0) -> None: ``` ``` -------------------------------- ### Get Text Content of InputText Source: https://github.com/kujirahand/tkeasygui-python/blob/main/docs/TkEasyGUI/widgets-py.md Retrieves the entire text content currently displayed in the InputText widget. Similar to `get()` but specifically for text. ```python def get_text(self) -> str: pass ``` -------------------------------- ### Combo.prepare_create Source: https://github.com/kujirahand/tkeasygui-python/blob/main/docs/TkEasyGUI/widgets-py.md Prepares the Combo widget for creation. ```APIDOC ## Combo.prepare_create ### Description Prepares the Combo widget for creation. ### Parameters #### Query Parameters - **win** (Window) - The window object. ### Method ```python def prepare_create(self, win: Window) -> None: ``` ``` -------------------------------- ### ColorBrowse.prepare_create Source: https://github.com/kujirahand/tkeasygui-python/blob/main/docs/TkEasyGUI/widgets-py.md Prepares the ColorBrowse widget before its creation. ```APIDOC ## ColorBrowse.prepare_create ### Description Prepare to create a widget. ### Method POST ### Endpoint /ColorBrowse/prepare_create ### Parameters #### Request Body - **win** (Window) - The Window object. ``` -------------------------------- ### Textarea.get_selection_pos Source: https://github.com/kujirahand/tkeasygui-python/blob/main/docs/TkEasyGUI/widgets-py.md Retrieves the start and end positions of the selected text within the Textarea widget. Returns a tuple of strings representing the start and end positions. ```APIDOC ## Textarea.get_selection_pos ### Description Get selection position, returns (start_pos, end_pos). ### Method ```python def get_selection_pos(self) -> tuple[str, str]: ``` ``` -------------------------------- ### FileSaveAs.prepare_create Source: https://github.com/kujirahand/tkeasygui-python/blob/main/docs/TkEasyGUI/widgets-py.md Prepares the widget for creation, potentially setting up necessary configurations before it's added to the window. ```APIDOC ## FileSaveAs.prepare_create ### Description Prepare to create a widget. ### Method Signature ```python def prepare_create(self, win: Window) -> None: ``` ``` -------------------------------- ### Get Window Values Source: https://github.com/kujirahand/tkeasygui-python/blob/main/docs/TkEasyGUI/widgets-py.md Retrieves a dictionary containing the current values of all input elements within the window. This is commonly used after an event to get user input. ```python def get_values(self) -> dict[KeyType, Any]: ``` -------------------------------- ### Deploy to PyPI Test and Main Repositories Source: https://github.com/kujirahand/tkeasygui-python/blob/main/docs/dev.md Use these commands to deploy the package to the PyPI test repository first, and then to the main PyPI repository after successful testing. ```sh make deploy-test make deploy-main ``` -------------------------------- ### Push.prepare_create Method Signature Source: https://github.com/kujirahand/tkeasygui-python/blob/main/docs/TkEasyGUI/widgets-py.md A method called before the Push widget is created. It can be used for pre-creation setup. ```python def prepare_create(self, win: Window, parent: tk.Widget) -> None: ``` -------------------------------- ### Submit.get_width Source: https://github.com/kujirahand/tkeasygui-python/blob/main/docs/TkEasyGUI/widgets-py.md Gets the width of the element. ```APIDOC ## Submit.get_width ### Description Returns the current width of the Submit element. ### Method `get_width() -> int` ``` -------------------------------- ### TkEasyGUI popup_yes_no Simple Example Source: https://github.com/kujirahand/tkeasygui-python/blob/main/docs/TkEasyGUI/dialogs-py.md Demonstrates a basic usage of the popup_yes_no function to ask a simple question with 'Yes' and 'No' buttons. ```python ans = eg.popup_yes_no("Do you like Sushi?", "Question") print(ans) # "Yes" or "No" ``` -------------------------------- ### Progressbar.start Method Source: https://github.com/kujirahand/tkeasygui-python/blob/main/docs/TkEasyGUI/widgets-py.md Starts the indeterminate mode of the Progressbar, typically used when the duration is unknown. An interval can be specified for the animation. ```python def start(self, interval: int = 100) -> None: ... ``` -------------------------------- ### Submit.get_height Source: https://github.com/kujirahand/tkeasygui-python/blob/main/docs/TkEasyGUI/widgets-py.md Gets the height of the element. ```APIDOC ## Submit.get_height ### Description Returns the current height of the Submit element. ### Method `get_height() -> int` ``` -------------------------------- ### VPush Element Example Source: https://github.com/kujirahand/tkeasygui-python/blob/main/docs/TkEasyGUI/widgets-py.md Demonstrates the use of VPush to create flexible space in a TkEasyGUI window layout, centering content vertically. Requires TkEasyGUI to be imported as eg. ```python import TkEasyGUI as eg layout = [ [eg.VPush()], [eg.Push(), eg.Text("== Middle =="), eg.Push()], [eg.Push(), eg.Button("OK"), eg.Push()], [eg.VPush()], ] window = eg.Window(title="VPush Test", layout=layout, size=(400, 350)) while window.is_alive(): event, values = window.read(timeout=1000) if event == eg.WIN_CLOSED or event == "OK": break ``` -------------------------------- ### Output.create Source: https://github.com/kujirahand/tkeasygui-python/blob/main/docs/TkEasyGUI/widgets-py.md Creates a Multiline widget within a given window and parent. ```APIDOC ## Output.create ### Description Creates a Multiline widget within a given window and parent. ### Method Signature ```python def create(self, win: Window, parent: tk.Widget) -> tk.Widget: ``` ### Parameters - **win** (Window) - Required - The window object. - **parent** (tk.Widget) - Required - The parent widget. ### Returns - tk.Widget: The created Tkinter widget. ``` -------------------------------- ### Menu.get_width Source: https://github.com/kujirahand/tkeasygui-python/blob/main/docs/TkEasyGUI/widgets-py.md Get width of element. ```APIDOC ## Menu.get_width ### Description Get width of element. ### Method GET (or equivalent for SDK) ### Endpoint /Menu/get_width ### Parameters None ### Response #### Success Response - **width** (int) - The width of the element. ``` -------------------------------- ### Textarea.prepare_create Source: https://github.com/kujirahand/tkeasygui-python/blob/main/docs/TkEasyGUI/widgets-py.md Prepares the Textarea widget for creation, often involving setting up initial properties before it's added to the TkEasyGUI window. ```APIDOC ## Textarea.prepare_create ### Description Prepare to create a widget. ### Parameters #### Query Parameters - **win** (Window) - Required - The TkEasyGUI window object. ### Method ```python def prepare_create(self, win: Window) -> None: ``` ``` -------------------------------- ### Menu.get_text Source: https://github.com/kujirahand/tkeasygui-python/blob/main/docs/TkEasyGUI/widgets-py.md Get the text of the widget. ```APIDOC ## Menu.get_text ### Description Get the text of the widget. ### Method GET (or equivalent for SDK) ### Endpoint /Menu/get_text ### Parameters None ### Response #### Success Response - **text** (str) - The text of the widget. ``` -------------------------------- ### Element.prepare_create Source: https://github.com/kujirahand/tkeasygui-python/blob/main/docs/TkEasyGUI/widgets-py.md Prepares the element for widget creation. ```APIDOC ## Element.prepare_create ### Description Prepares to create a widget. ### Method Signature ```python def prepare_create(self, win: Window) -> None: ``` ### Parameters * **win** (Window) - The window object. ``` -------------------------------- ### TkEasyGUI popup_yes_no Custom Label Example Source: https://github.com/kujirahand/tkeasygui-python/blob/main/docs/TkEasyGUI/dialogs-py.md Shows how to customize the labels for the 'Yes' and 'No' buttons in the popup_yes_no dialog. ```python ans = eg.popup_yes_no("Do you eat Sushi?", yes_label="EAT", no_label="no") print(ans) # "Yes" or "No" ``` -------------------------------- ### Menu.get_name Source: https://github.com/kujirahand/tkeasygui-python/blob/main/docs/TkEasyGUI/widgets-py.md Get key of element. ```APIDOC ## Menu.get_name ### Description Get key of element. ### Method GET (or equivalent for SDK) ### Endpoint /Menu/get_name ### Parameters None ### Response #### Success Response - **name** (str) - The key of the element. ``` -------------------------------- ### Menu.get_height Source: https://github.com/kujirahand/tkeasygui-python/blob/main/docs/TkEasyGUI/widgets-py.md Get height of element. ```APIDOC ## Menu.get_height ### Description Get height of element. ### Method GET (or equivalent for SDK) ### Endpoint /Menu/get_height ### Parameters None ### Response #### Success Response - **height** (int) - The height of the element. ``` -------------------------------- ### MultilineBrowse.prepare_create Source: https://github.com/kujirahand/tkeasygui-python/blob/main/docs/TkEasyGUI/widgets-py.md Prepare for the creation of a MultilineBrowse widget. ```APIDOC ## MultilineBrowse.prepare_create ### Description Prepare to create a widget. ### Method POST ### Endpoint /multilinebrowse/prepare_create ### Parameters #### Request Body - **win** (Window) - The window object. ``` -------------------------------- ### FilesBrowse.prepare_create Source: https://github.com/kujirahand/tkeasygui-python/blob/main/docs/TkEasyGUI/widgets-py.md Prepares the widget for creation. This method is called before the widget is fully instantiated and can be used for setting up necessary configurations. ```APIDOC ## FilesBrowse.prepare_create ### Description Prepares the widget for creation. This method is called before the widget is fully instantiated and can be used for setting up necessary configurations. ### Method ```python def prepare_create(self, win: Window) -> None: ``` ### Parameters - **win** (Window) - Required - The Window object. ``` -------------------------------- ### Menu.get Source: https://github.com/kujirahand/tkeasygui-python/blob/main/docs/TkEasyGUI/widgets-py.md Get the value of the widget. ```APIDOC ## Menu.get ### Description Get the value of the widget. ### Method GET (or equivalent for SDK) ### Endpoint /Menu/get ### Parameters None ### Response #### Success Response - **value** (Any) - The current value of the widget. ``` -------------------------------- ### Submit.prepare_create Source: https://github.com/kujirahand/tkeasygui-python/blob/main/docs/TkEasyGUI/widgets-py.md Prepares the element for creation. ```APIDOC ## Submit.prepare_create ### Description Performs any necessary setup or preparation before the Submit element is actually created in the GUI. ### Method `prepare_create(win: Window) -> None` ### Parameters - **win** (Window) - The Window object containing this element. ``` -------------------------------- ### Canvas.get_bind_dict Source: https://github.com/kujirahand/tkeasygui-python/blob/main/docs/TkEasyGUI/widgets-py.md Get bind dict. ```APIDOC ## Canvas.get_bind_dict ### Description Get bind dict. ### Signature ```python def get_bind_dict(self) -> dict[str, tuple[str, bool, EventMode]]: ``` ``` -------------------------------- ### Button.get_width Source: https://github.com/kujirahand/tkeasygui-python/blob/main/docs/TkEasyGUI/widgets-py.md Get width of element. ```APIDOC ## Button.get_width ### Description Get width of element. ### Signature ```python def get_width(self) -> int: ``` ``` -------------------------------- ### FileSaveAsBrowse.prepare_create Source: https://github.com/kujirahand/tkeasygui-python/blob/main/docs/TkEasyGUI/widgets-py.md Prepares the widget for creation within the window context. ```APIDOC ## FileSaveAsBrowse.prepare_create ### Description Prepares the widget for creation within the window context. ### Parameters #### Path Parameters - **win** (Window) - The window object the widget will be associated with. ### Method ```python def prepare_create(self, win: Window) -> None: ``` ``` -------------------------------- ### MultilineBrowse.prepare_create Source: https://github.com/kujirahand/tkeasygui-python/blob/main/docs/TkEasyGUI/widgets-py.md Prepares the MultilineBrowse widget for creation. ```APIDOC ## MultilineBrowse.prepare_create ### Description Prepares the MultilineBrowse widget for creation. ### Method prepare_create ### Parameters None ``` -------------------------------- ### Button.get_text Source: https://github.com/kujirahand/tkeasygui-python/blob/main/docs/TkEasyGUI/widgets-py.md Get the text of the button. ```APIDOC ## Button.get_text ### Description Get the text of the button. ### Signature ```python def get_text(self) -> str: ``` ``` -------------------------------- ### VPush.prepare_create Source: https://github.com/kujirahand/tkeasygui-python/blob/main/docs/TkEasyGUI/widgets-py.md Prepares the VPush widget for creation. ```APIDOC ## VPush.prepare_create ### Description Prepare to create a widget. ### Method POST ### Endpoint VPush.prepare_create ### Parameters #### Request Body - **win** (Window) - Required - The window object. ``` -------------------------------- ### Button.get_prev_element Source: https://github.com/kujirahand/tkeasygui-python/blob/main/docs/TkEasyGUI/widgets-py.md Get the previous widget. ```APIDOC ## Button.get_prev_element ### Description Get the previous widget. ### Parameters #### Path Parameters - **target_key** (Union[str, None]) - Optional - Description: The key of the target element to find the previous one for. ### Signature ```python def get_prev_element(self, target_key: Union[str, None] = None) -> Union["Element", None]: ``` ``` -------------------------------- ### Button.get_name Source: https://github.com/kujirahand/tkeasygui-python/blob/main/docs/TkEasyGUI/widgets-py.md Get key of element. ```APIDOC ## Button.get_name ### Description Get key of element. ### Signature ```python def get_name(self) -> str: ``` ``` -------------------------------- ### Listbox.prepare_create Source: https://github.com/kujirahand/tkeasygui-python/blob/main/docs/TkEasyGUI/widgets-py.md Prepare to create a widget for Listbox. ```APIDOC ## Listbox.prepare_create ### Description Prepare to create a widget for Listbox. ### Signature ```python def prepare_create(self, win: Window) -> None: ``` ``` -------------------------------- ### Button.get_height Source: https://github.com/kujirahand/tkeasygui-python/blob/main/docs/TkEasyGUI/widgets-py.md Get height of element. ```APIDOC ## Button.get_height ### Description Get height of element. ### Signature ```python def get_height(self) -> int: ``` ``` -------------------------------- ### Button.get_bind_dict Source: https://github.com/kujirahand/tkeasygui-python/blob/main/docs/TkEasyGUI/widgets-py.md Get bind dict. ```APIDOC ## Button.get_bind_dict ### Description Get bind dict. ### Signature ```python def get_bind_dict(self) -> dict[str, tuple[str, bool, EventMode]]: ``` ``` -------------------------------- ### Submit.prepare_create Source: https://github.com/kujirahand/tkeasygui-python/blob/main/docs/TkEasyGUI/widgets-py.md Prepares the environment before creating the Submit widget. ```APIDOC ## Submit.prepare_create ### Description Prepare to create a widget. ### Method POST ### Endpoint ``` Submit.prepare_create(win: Window) ``` ### Parameters #### Path Parameters - **win** (Window) - Required - The Window object. ``` -------------------------------- ### VPush.get_height Source: https://github.com/kujirahand/tkeasygui-python/blob/main/docs/TkEasyGUI/widgets-py.md Gets the height of the VPush element. ```APIDOC ## VPush.get_height ### Description Get height of element. ### Signature ```python def get_height(self) -> int: ``` ``` -------------------------------- ### Menu.post_create Source: https://github.com/kujirahand/tkeasygui-python/blob/main/docs/TkEasyGUI/widgets-py.md Post create widget. ```APIDOC ## Menu.post_create ### Description Post create widget. ### Method POST (or equivalent for SDK) ### Endpoint /Menu/post_create ### Parameters #### Request Body - **win** (Window) - The window object. - **parent** (tk.Widget) - The parent widget. ``` -------------------------------- ### Submit.get_text Source: https://github.com/kujirahand/tkeasygui-python/blob/main/docs/TkEasyGUI/widgets-py.md Gets the text displayed on the button. ```APIDOC ## Submit.get_text ### Description Retrieves and returns the text label displayed on the Submit button. This is an alias for the `get()` method. ### Method `get_text() -> str` ``` -------------------------------- ### ListBrowse.create Source: https://github.com/kujirahand/tkeasygui-python/blob/main/docs/TkEasyGUI/widgets-py.md Creates a FileBrowse widget, initializing it within a given window and parent widget. ```APIDOC ## ListBrowse.create ### Description Create a FileBrowse widget. ### Signature ```python def create(self, win: Window, parent: tk.Widget) -> tk.Widget: ``` ``` -------------------------------- ### Submit.get_name Source: https://github.com/kujirahand/tkeasygui-python/blob/main/docs/TkEasyGUI/widgets-py.md Gets the key (identifier) of the element. ```APIDOC ## Submit.get_name ### Description Returns the unique key or identifier assigned to this Submit element. ### Method `get_name() -> str` ``` -------------------------------- ### Button prepare_create Method Source: https://github.com/kujirahand/tkeasygui-python/blob/main/docs/TkEasyGUI/widgets-py.md Prepares the Button widget before its creation. Requires the window object. ```python def prepare_create(self, win: Window) -> None: ``` -------------------------------- ### Radio.get_height Source: https://github.com/kujirahand/tkeasygui-python/blob/main/docs/TkEasyGUI/widgets-py.md Get the height of the Radio element. ```APIDOC ## Radio.get_height ### Description Get height of element. ### Method Signature `get_height(self) -> int` ``` -------------------------------- ### CalendarButton.prepare_create Source: https://github.com/kujirahand/tkeasygui-python/blob/main/docs/TkEasyGUI/widgets-py.md Prepare to create a widget. ```APIDOC ## CalendarButton.prepare_create ### Description Prepare to create a widget. ### Signature ```python def prepare_create(self, win: Window) -> None: ``` ``` -------------------------------- ### Output.get_width Source: https://github.com/kujirahand/tkeasygui-python/blob/main/docs/TkEasyGUI/widgets-py.md Get the width of the Output element. ```APIDOC ## Output.get_width ### Description Get the width of the Output element. ### Method GET ### Endpoint /output/width ### Parameters None. ### Response #### Success Response (200) - **width** (int) - The width of the element. ``` -------------------------------- ### Button.post_create Source: https://github.com/kujirahand/tkeasygui-python/blob/main/docs/TkEasyGUI/widgets-py.md Post create widget. ```APIDOC ## Button.post_create ### Description Post create widget. ### Parameters #### Path Parameters - **win** (Window) - Required - Description: The window object. - **parent** (tk.Widget) - Required - Description: The parent widget. ### Signature ```python def post_create(self, win: Window, parent: tk.Widget) -> None: ``` ``` -------------------------------- ### Output.get_prev_element Source: https://github.com/kujirahand/tkeasygui-python/blob/main/docs/TkEasyGUI/widgets-py.md Get the previous element in the layout. ```APIDOC ## Output.get_prev_element ### Description Get the previous element in the layout. ### Method GET ### Endpoint /output/prev_element ### Parameters None. ### Response #### Success Response (200) - **element** (Element) - The previous element. ``` -------------------------------- ### Output.get_name Source: https://github.com/kujirahand/tkeasygui-python/blob/main/docs/TkEasyGUI/widgets-py.md Get the name of the Output element. ```APIDOC ## Output.get_name ### Description Get the name of the Output element. ### Method GET ### Endpoint /output/name ### Parameters None. ### Response #### Success Response (200) - **name** (str) - The name of the element. ``` -------------------------------- ### FolderBrowse.post_create Source: https://github.com/kujirahand/tkeasygui-python/blob/main/docs/TkEasyGUI/widgets-py.md Performs actions after the widget has been created, typically involving the window and its parent widget. ```APIDOC ## FolderBrowse.post_create ### Description Post create widget. ### Signature ```python def post_create(self, win: Window, parent: tk.Widget) -> None: ``` ``` -------------------------------- ### Output.get_height Source: https://github.com/kujirahand/tkeasygui-python/blob/main/docs/TkEasyGUI/widgets-py.md Get the height of the Output element. ```APIDOC ## Output.get_height ### Description Get the height of the Output element. ### Method GET ### Endpoint /output/height ### Parameters None. ### Response #### Success Response (200) - **height** (int) - The height of the element. ``` -------------------------------- ### Multiline.prepare_create Source: https://github.com/kujirahand/tkeasygui-python/blob/main/docs/TkEasyGUI/widgets-py.md Prepares the Multiline widget before its creation. ```APIDOC ## Multiline.prepare_create ### Description Prepare to create a widget. ### Method ```python def prepare_create(self, win: Window) -> None: ``` ``` -------------------------------- ### Text.prepare_create Source: https://github.com/kujirahand/tkeasygui-python/blob/main/docs/TkEasyGUI/widgets-py.md Prepares the Text widget before its creation. ```APIDOC ## Text.prepare_create ### Description Prepare to create a widget. ### Method POST ### Endpoint /Text/prepare_create ### Parameters #### Request Body - **win** (Window) - Required - The Window object. ``` -------------------------------- ### Output.get Source: https://github.com/kujirahand/tkeasygui-python/blob/main/docs/TkEasyGUI/widgets-py.md Get the content of the Output element. ```APIDOC ## Output.get ### Description Get the content of the Output element. ### Method GET ### Endpoint /output/content ### Parameters None. ### Response #### Success Response (200) - **content** (str) - The content of the Output element. ``` -------------------------------- ### MultilineBrowse.get_width Source: https://github.com/kujirahand/tkeasygui-python/blob/main/docs/TkEasyGUI/widgets-py.md Get the width of the MultilineBrowse element. ```APIDOC ## MultilineBrowse.get_width ### Description Get width of element. ### Method GET ### Endpoint /multilinebrowse/width ### Parameters None ### Response #### Success Response (200) - **width** (int) - The width of the element. ``` -------------------------------- ### Text.prepare_create Source: https://github.com/kujirahand/tkeasygui-python/blob/main/docs/TkEasyGUI/widgets-py.md Prepares the Text widget before its creation. ```APIDOC ## Text.prepare_create ### Description Prepares the Text widget before its creation. ### Method Signature ```python def prepare_create(self, win: Window) -> None: ``` ### Parameters - **win** (Window) - Required - The parent Window object. ``` -------------------------------- ### Create a Simple Window with Labels and Buttons (Read Loop) Source: https://github.com/kujirahand/tkeasygui-python/blob/main/README.md Define a basic window layout with a text label and a button, then process events using a read loop. The loop breaks when the 'OK' button is pressed or the window is closed. ```python import TkEasyGUI as eg # define layout layout = [ [eg.Text("Hello, World!")], [eg.Button("OK")] ] # create a window window = eg.Window("Hello App", layout) # event loop while True: event, values = window.read() if event in ["OK", eg.WINDOW_CLOSED]: eg.popup("Thank you.") break ``` -------------------------------- ### Input.get_height Source: https://github.com/kujirahand/tkeasygui-python/blob/main/docs/TkEasyGUI/widgets-py.md Gets the height of the input element. ```APIDOC ## Input.get_height ### Description Gets the height of the input element. ### Method ```python def get_height(self) -> int: ``` ### Returns * int - The height of the element. ``` -------------------------------- ### Image.get_width Source: https://github.com/kujirahand/tkeasygui-python/blob/main/docs/TkEasyGUI/widgets-py.md Gets the width of the Image element. ```APIDOC ## Image.get_width ### Description Gets the width of the Image element. ### Method `get_width() -> int` ``` -------------------------------- ### Image.get_height Source: https://github.com/kujirahand/tkeasygui-python/blob/main/docs/TkEasyGUI/widgets-py.md Gets the height of the Image element. ```APIDOC ## Image.get_height ### Description Gets the height of the Image element. ### Method `get_height() -> int` ``` -------------------------------- ### push_easy_window Source: https://github.com/kujirahand/tkeasygui-python/blob/main/docs/TkEasyGUI/widgets-py.md Adds a window to the EasyGUI window management stack. ```APIDOC ## push_easy_window ### Description Push a window to the list. This function adds a given window object to the internal list of managed EasyGUI windows. ### Signature ```python def push_easy_window(win: "Window") -> None: ``` ### Parameters - **win** ("Window"): The window object to add to the stack. ``` -------------------------------- ### FrameScrollable.get_width Source: https://github.com/kujirahand/tkeasygui-python/blob/main/docs/TkEasyGUI/widgets-py.md Gets the current width of the element. ```APIDOC ## FrameScrollable.get_width ### Description Gets the current width of the element. ### Method Signature ```python def get_width(self) -> int: ``` ``` -------------------------------- ### CalendarBrowse.prepare_create Source: https://github.com/kujirahand/tkeasygui-python/blob/main/docs/TkEasyGUI/widgets-py.md Prepares the CalendarBrowse widget for creation within a TkEasyGUI Window. ```APIDOC ## CalendarBrowse.prepare_create ### Description Prepares the CalendarBrowse widget for creation within a TkEasyGUI Window. ### Method Signature ```python def prepare_create(self, win: Window) -> None: ``` ### Parameters * **win** (Window) - The TkEasyGUI Window object. ``` -------------------------------- ### FrameScrollable.get_name Source: https://github.com/kujirahand/tkeasygui-python/blob/main/docs/TkEasyGUI/widgets-py.md Gets the key name of the element. ```APIDOC ## FrameScrollable.get_name ### Description Gets the key name of the element. ### Method Signature ```python def get_name(self) -> str: ``` ``` -------------------------------- ### FrameScrollable.get_height Source: https://github.com/kujirahand/tkeasygui-python/blob/main/docs/TkEasyGUI/widgets-py.md Gets the current height of the element. ```APIDOC ## FrameScrollable.get_height ### Description Gets the current height of the element. ### Method Signature ```python def get_height(self) -> int: ``` ``` -------------------------------- ### Output.create Source: https://github.com/kujirahand/tkeasygui-python/blob/main/docs/TkEasyGUI/widgets-py.md Create the Output element. ```APIDOC ## Output.create ### Description Create the Output element. ### Method POST ### Endpoint /output/create ### Parameters None specified in source. ``` -------------------------------- ### FolderBrowse.get_height Source: https://github.com/kujirahand/tkeasygui-python/blob/main/docs/TkEasyGUI/widgets-py.md Gets the height of the FolderBrowse element. ```APIDOC ## FolderBrowse.get_height ### Description Gets the height of the FolderBrowse element. ### Method ```python def get_height(self) -> int: ``` ``` -------------------------------- ### InputText.prepare_create Source: https://github.com/kujirahand/tkeasygui-python/blob/main/docs/TkEasyGUI/widgets-py.md Prepares the widget for creation, typically involving operations before the actual widget is rendered. ```APIDOC ## InputText.prepare_create ### Description Prepare to create a widget. ### Method `prepare_create` ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **win** (Window) - The Window object. ``` -------------------------------- ### FileSaveAs.get_height Source: https://github.com/kujirahand/tkeasygui-python/blob/main/docs/TkEasyGUI/widgets-py.md Gets the height of the FileSaveAs element. ```APIDOC ## FileSaveAs.get_height ### Description Gets the height of the FileSaveAs element. ### Method Signature ```python def get_height(self) -> int: ``` ``` -------------------------------- ### get_system_info Source: https://github.com/kujirahand/tkeasygui-python/blob/main/docs/TkEasyGUI/utils-py.md Gathers and returns comprehensive information about the current system environment. ```APIDOC ## get_system_info ### Description Gathers and returns comprehensive information about the current system environment. ### Method ```python def get_system_info(): ``` ``` -------------------------------- ### Column.get_width Source: https://github.com/kujirahand/tkeasygui-python/blob/main/docs/TkEasyGUI/widgets-py.md Get width of Column element. ```APIDOC ## Column.get_width ### Description Get width of element. ### Method GET ### Endpoint /Column/get_width ### Response #### Success Response (200) - **width** (int) - The width of the Column element. ``` -------------------------------- ### FrameScrollable.prepare_create Source: https://github.com/kujirahand/tkeasygui-python/blob/main/docs/TkEasyGUI/widgets-py.md Prepares the widget for creation within a Window. ```APIDOC ## FrameScrollable.prepare_create ### Description Prepares the widget for creation within a Window. ### Method Signature ```python def prepare_create(self, win: Window) -> None: ``` ### Parameters * **win** (Window) - The Window object. ``` -------------------------------- ### CloseButton.get_width Source: https://github.com/kujirahand/tkeasygui-python/blob/main/docs/TkEasyGUI/widgets-py.md Gets the width of the CloseButton element. ```APIDOC ## CloseButton.get_width ### Description Gets the width of the CloseButton element. ### Method Signature ```python def get_width(self) -> int: ``` ``` -------------------------------- ### CloseButton.get_text Source: https://github.com/kujirahand/tkeasygui-python/blob/main/docs/TkEasyGUI/widgets-py.md Gets the text displayed on the CloseButton. ```APIDOC ## CloseButton.get_text ### Description Gets the text displayed on the CloseButton. ### Method Signature ```python def get_text(self) -> str: ``` ``` -------------------------------- ### TabGroup.prepare_create Source: https://github.com/kujirahand/tkeasygui-python/blob/main/docs/TkEasyGUI/widgets-py.md Prepares the TabGroup widget for creation within a Window. ```APIDOC ## TabGroup.prepare_create ### Description Prepare to create a widget. ### Method ```python def prepare_create(self, win: Window) -> None: ``` ### Parameters #### Path Parameters * **win** (Window) - Required - The Window object. ### Source [source](https://github.com/kujirahand/tkeasygui-python/blob/main/TkEasyGUI/widgets.py#L1530) ``` -------------------------------- ### Image.prepare_create Source: https://github.com/kujirahand/tkeasygui-python/blob/main/docs/TkEasyGUI/widgets-py.md Prepares the Image widget before its creation. ```APIDOC ## Image.prepare_create ### Description Prepare to create a widget. ### Method ```python def prepare_create(self, win: Window) -> None: ``` ``` -------------------------------- ### CloseButton.get_height Source: https://github.com/kujirahand/tkeasygui-python/blob/main/docs/TkEasyGUI/widgets-py.md Gets the height of the CloseButton element. ```APIDOC ## CloseButton.get_height ### Description Gets the height of the CloseButton element. ### Method Signature ```python def get_height(self) -> int: ``` ``` -------------------------------- ### CalendarBrowse.get_width Source: https://github.com/kujirahand/tkeasygui-python/blob/main/docs/TkEasyGUI/widgets-py.md Gets the width of the CalendarBrowse element. ```APIDOC ## CalendarBrowse.get_width ### Description Gets the width of the CalendarBrowse element. ### Method Signature ```python def get_width(self) -> int: ``` ### Returns * **int** - The width of the element. ``` -------------------------------- ### Image Constructor Source: https://github.com/kujirahand/tkeasygui-python/blob/main/docs/TkEasyGUI/widgets-py.md Creates an Image element with various configuration options. ```APIDOC ## Image ### Description Creates an Image element. ### Parameters - **source** (Union[bytes, str, None]): The image source (bytes or string path). - **filename** (str, optional): The filename of the image. - **data** (Union[bytes, PILImage.Image, None]): Image data. - **key** (Union[str, None], optional): A unique key for the element. - **background_color** (Union[tuple[int, int, int], str, None], optional): Background color. - **size** (tuple[int, int], optional): The size of the image widget. Defaults to (300, 300). - **resize_type** (ImageResizeType, optional): The type of resizing to apply. Defaults to ImageResizeType.FIT_BOTH. - **enable_events** (bool, optional): Whether to enable events for this element. Defaults to False. - **metadata** (Union[dict[str, Any], None], optional): Metadata for the element. - **kw**: Additional keyword arguments. ``` -------------------------------- ### CalendarBrowse.get_height Source: https://github.com/kujirahand/tkeasygui-python/blob/main/docs/TkEasyGUI/widgets-py.md Gets the height of the CalendarBrowse element. ```APIDOC ## CalendarBrowse.get_height ### Description Gets the height of the CalendarBrowse element. ### Method Signature ```python def get_height(self) -> int: ``` ### Returns * **int** - The height of the element. ``` -------------------------------- ### Create and Update Button Label Source: https://github.com/kujirahand/tkeasygui-python/blob/main/docs/TkEasyGUI/widgets-py.md This example demonstrates how to create a Button widget and change its label when it is pressed. It requires importing TkEasyGUI. ```python import TkEasyGUI as eg button:eg.Button = eg.Button("Push me") with eg.Window("Title", layout=[[button]]) as window: for event, values in window.event_iter(): if event == button.get_text(): button.set_text("Pushed") break ``` -------------------------------- ### Combo.create Source: https://github.com/kujirahand/tkeasygui-python/blob/main/docs/TkEasyGUI/widgets-py.md Creates the Combo box widget. ```APIDOC ## Combo.create ### Description [Combo.create] create Listbox widget ### Method `create(self, win: Window, parent: tk.Widget) -> tk.Widget` ``` -------------------------------- ### VPush.get_name Source: https://github.com/kujirahand/tkeasygui-python/blob/main/docs/TkEasyGUI/widgets-py.md Gets the key (name) of the VPush element. ```APIDOC ## VPush.get_name ### Description Get key of element. ### Signature ```python def get_name(self) -> str: ``` ``` -------------------------------- ### Output.post_create Source: https://github.com/kujirahand/tkeasygui-python/blob/main/docs/TkEasyGUI/widgets-py.md Perform actions after the Output widget has been created. ```APIDOC ## Output.post_create ### Description Post create widget. ### Method POST ### Endpoint /output/post_create ### Parameters #### Request Body - **win** (Window) - The window object. - **parent** (tk.Widget) - The parent widget. ``` -------------------------------- ### Menu.create Source: https://github.com/kujirahand/tkeasygui-python/blob/main/docs/TkEasyGUI/widgets-py.md Create a Text widget for the Menu. ```APIDOC ## Menu.create ### Description Create a Text widget for the Menu. ### Signature ```python def create(self, win: Window, parent: tk.Widget) -> tk.Widget: ``` ``` -------------------------------- ### Radio.get_name Source: https://github.com/kujirahand/tkeasygui-python/blob/main/docs/TkEasyGUI/widgets-py.md Get the key (name) of the Radio element. ```APIDOC ## Radio.get_name ### Description Get key of element. ### Method Signature `get_name(self) -> str` ``` -------------------------------- ### Graph.prepare_create Source: https://github.com/kujirahand/tkeasygui-python/blob/main/docs/TkEasyGUI/widgets-py.md Prepares the Graph element for creation within a window. ```APIDOC ## Graph.prepare_create ### Description Prepare to create a widget. ### Method Signature ```python def prepare_create(self, win: Window) -> None: ``` ### Parameters - **win** (Window) - The window object. ``` -------------------------------- ### Radio.get Source: https://github.com/kujirahand/tkeasygui-python/blob/main/docs/TkEasyGUI/widgets-py.md Get the current value of the Radio widget. ```APIDOC ## Radio.get ### Description Get the value of the widget. ### Method Signature `get(self) -> Any` ``` -------------------------------- ### Output.get_text Source: https://github.com/kujirahand/tkeasygui-python/blob/main/docs/TkEasyGUI/widgets-py.md Get the text content of the Output element. ```APIDOC ## Output.get_text ### Description Get the text content of the Output element. ### Method GET ### Endpoint /output/text ### Parameters None. ### Response #### Success Response (200) - **text** (str) - The text content of the element. ```