Skip to main content

Functional dataclass implementations for DearPyGUI container types

Project description

DPGContainers

Motivation

DearPyGUI provides a functional interface for creating objects - windows, groups, et al. This library provides a collection of classes that can be used to create DPG objects as instances.

Installation

pip install dpgcontainers

Example usage

from dpgcontainers.containers import Window, Group, Button

window = Window(width=100, height=200)(
    Group(horizontal=True)(
        Button(tag='button_1'),
        Button(tag='button_2'),
    ),
)


window.tagged_entities['button_1'].callback = lambda: print('clicked!')
window.render()

Children are captured by calling instances as functions. The render cycle is aware of objects that have already been rendered, so the following is fine:

window = Window()

window(Button('button_1'))
window.render()

window(Button('button_2'))
window.render()
  • added find method to base class, returns first found named child
  • search_named_children deprecated, use newly added find instead.
  • added find_all, returns a list of all named children matching name
  • added search and search_all methods, which function on named children but allow regex pattern searching
  • Themes, Colormaps, and Fonts can now be bound via instance.bind() or instance.bind(item) as appropriate

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

dpgcontainers-0.1.10.tar.gz (30.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dpgcontainers-0.1.10-py3-none-any.whl (17.3 kB view details)

Uploaded Python 3

File details

Details for the file dpgcontainers-0.1.10.tar.gz.

File metadata

  • Download URL: dpgcontainers-0.1.10.tar.gz
  • Upload date:
  • Size: 30.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.7.3

File hashes

Hashes for dpgcontainers-0.1.10.tar.gz
Algorithm Hash digest
SHA256 53a54c660cda4ed850d361bdb7a4eeac3b9018b546c43ad0da50f8e225808c61
MD5 e7ead96e816295d2d1f147fd4ed9045f
BLAKE2b-256 ef53401c72808e54bd4741740df44674d5c94faea37ff38534e9d9a3b00988c9

See more details on using hashes here.

File details

Details for the file dpgcontainers-0.1.10-py3-none-any.whl.

File metadata

File hashes

Hashes for dpgcontainers-0.1.10-py3-none-any.whl
Algorithm Hash digest
SHA256 42b28c934fbf41df39618415e9e2e42bca222139cde0e5e342d14c3f03ee804a
MD5 419d5c5a4f3c32f7cb873776ba92a935
BLAKE2b-256 50e60d0a5a0316bd3a0949f4630a9de2b8fa6b63c85d0e4317992fc68e9f9c0d

See more details on using hashes here.

Supported by

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