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.8.tar.gz (30.6 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.8-py3-none-any.whl (17.3 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for dpgcontainers-0.1.8.tar.gz
Algorithm Hash digest
SHA256 b2b69660d05d94252c916833c1745b1a1dce716c98055e064597ccb51f0c9797
MD5 165c585758d8222612bebcc6bf12e202
BLAKE2b-256 b2e2bd3224dde4ed54e5aca76eac6c841536b5b913d22454106dccbccb20d8b3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dpgcontainers-0.1.8-py3-none-any.whl
Algorithm Hash digest
SHA256 b2be05df66d84b87cd1d73e8d75f8bf4008eb5cf32f4042f09fef88adf466e8e
MD5 cf235d01899fa11407b8ed21c1821c81
BLAKE2b-256 44f454f642ba36c8fcdc34a56bf96c9eb48f32131d6ce61b2eddae69f9b769d4

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