Dear PyGUI a tool to make Graphic Interfaces (GUI) with Python – Cheatsheet

This, Dear PyGUI module, is a tool to create Graphin User Interfaces -GUI – along with the python programming language we all love. This uses Dear ImGui. It makes you create dynamic GUIs.

It has some nice features like;

Installation

pip install dearpygui

It weights 4.4 Mb and at the moment is dearpygui-1.10.1 version.

Dependencies

it has the following dependecies:

Example

Lots of examples of code can be found here; https://hoffstadt.github.io/DearPyGui/tutorial.html

from dearpygui.core import *
from dearpygui.simple import *

def apply_text_multiplier(sender, data):
    font_multiplier = get_value("Font Size Multiplier")
    set_global_font_scale(font_multiplier)

def apply_theme(sender, data):
    theme = get_value("Themes")
    set_theme(theme)

themes = ["Dark", "Light", "Classic", "Dark 2", "Grey", "Dark Grey", "Cherry", "Purple", "Gold", "Red"]

with window("Tutorial"):
    add_combo("Themes", items=themes, default_value="Dark", callback=apply_theme)

    add_slider_float("Font Size Multiplier", default_value=1.0, min_value=0.0, max_value=2.0,
                     callback=apply_text_multiplier)

start_dearpygui()

Subscribe to the newsletter for updates
Tkinter templates
My youtube channel

Twitter: @pythonprogrammi - python_pygame

Videos

Speech recognition game

Pygame's Platform Game

Other Pygame's posts