Skip to main content

A library used to make GUIs and Messages boxes and alot..

Project description

# PLEGUI (Python Library for Easy GUI Development)

`plegui` is a Python library that simplifies the creation and management of graphical user interfaces (GUIs) using `tkinter`. The library also provides utility functions for working with system processes, hiding command prompts, and more.

## Installation

To install the library, use pip:

```bash
pip install plegui

Features

  • Create and manage multiple GUI windows
  • Add buttons, labels, text entries, and dropdown menus
  • Hide or show the command prompt window
  • Utility functions for working with processes
  • Message box display support

Getting Started

To get started, import the library and create your first window using the GUI class.

from plegui import GUI, messagebox, system

Create a window with a specific title and resolution

GUI.create("My First Window", width=500, height=400)

Add a button to the window

GUI.add_button("My First Window", "Click Me", lambda: print("Button clicked!"))

Add a text entry field

entry = GUI.add_entry("My First Window")

Add a dropdown menu

dropdown = GUI.add_dropdown("My First Window", ["Option 1", "Option 2", "Option 3"])

Display a messagebox

messagebox.form("Hello, this is a message box!")

Set the window title to a new value

GUI.set_title("My First Window", "New Title")

Hide the command prompt window

GUI.set_cmd_hidden(True)

Close the window

GUI.close_window("My First Window")


### Creating Windows

To create a new window, use the `GUI.create` method. You can specify a custom width, height, and codename for the window.

```python
GUI.create("Window Name", width=500, height=400)

Adding Widgets

Buttons

To add a button to a window, use the GUI.add_button method. You can specify the window name, button text, and an optional command that will execute when the button is clicked.

GUI.add_button("Window Name", "Click Me", lambda: print("Button clicked!"))

Text Entry

To add a text entry field, use the GUI.add_entry method. This will return the Entry widget, allowing you to interact with the input.

entry = GUI.add_entry("Window Name")

Dropdown Menu

To add a dropdown menu, use the GUI.add_dropdown method. You can specify a list of options, and the method will return the selected option.

dropdown = GUI.add_dropdown("Window Name", ["Option 1", "Option 2", "Option 3"])

Labels

You can also add a label to display text using the GUI.label.create method.

GUI.label.create("Window Name", "This is a label")

Window Management

Set Window Title

To update the title of a window, use the GUI.set_title method.

GUI.set_title("Window Name", "New Title")

Close a Window

To close a window, use the GUI.close_window method.

GUI.close_window("Window Name")

System Utilities

Hiding the Command Prompt

You can hide or show the command prompt using the GUI.set_cmd_hidden method.

# Hide the command prompt
GUI.set_cmd_hidden(True)

# Show the command prompt
GUI.set_cmd_hidden(False)

Process Management

The system.process_add method allows you to modify the process name.

# Rename the process to "main.py"
system.process_add(True)

# Restore the original process name
system.process_add(False)

Message Boxes

To display a message box, use the messagebox.form method.

messagebox.form("This is a message!")

License

plegui is released under the MIT License.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

plegui-1.3.3.tar.gz (3.0 kB view details)

Uploaded Source

Built Distribution

plegui-1.3.3-py3-none-any.whl (3.1 kB view details)

Uploaded Python 3

File details

Details for the file plegui-1.3.3.tar.gz.

File metadata

  • Download URL: plegui-1.3.3.tar.gz
  • Upload date:
  • Size: 3.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for plegui-1.3.3.tar.gz
Algorithm Hash digest
SHA256 79b71f8058989db224211d87be27b34c27117dbc07305990cd923bce6bba368c
MD5 2b03b2fe387fe7fa4766900b6a5ca768
BLAKE2b-256 129952aa2c3a3fad0d652da17ce3a968db6f1e5e798a4ae798f2207cc407dd0f

See more details on using hashes here.

File details

Details for the file plegui-1.3.3-py3-none-any.whl.

File metadata

  • Download URL: plegui-1.3.3-py3-none-any.whl
  • Upload date:
  • Size: 3.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for plegui-1.3.3-py3-none-any.whl
Algorithm Hash digest
SHA256 0b874b4fd14815cf3d1a2b4694b5e54327b5c9a0efd143b8034125f725412251
MD5 5e4dea73d4760ed62c4951237031e7ba
BLAKE2b-256 3cf26d809e4c557b50b54505085275cd292c76e48ab07100257fb5cb69d98dbc

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page