Skip to main content

aio_wx_widgets

Project description

CI codecov Code style: black

aio_wx_widgets

Wx python app structure using MVC model. Work in progress, adding widgets when I need them. See the demo folder for usage.

Features:

  • Add widgets using context managers.
  • Two-way or one-way Property binding from controller properties to the view.
  • Proper Margins and alignment of items

The example below is a bit outdated, but gives a rough idea. Please see the demo for more.

```python
# Use a context manager for container types like a group or grid.
# A group is a container with a label and a sizer inside. Inside
# this sizer widgets, or other containers can be placed.
with self.add(Group("A labelled container.")) as group:
    group.add(Text(text="A horizontal grid."))

    with group.add(Grid()) as grd:
        # the binding binds to an attribute defined in the controller
        # the weight determines how much space a specific item should consume
        # with respect to the other members of the container.
        grd.add(IntEntry(binding=self.bind("value_1")), weight=6, margin=3)
        grd.add(IntEntry(binding=self.bind("value_1")), weight=4, margin=3)
        grd.add(IntEntry(binding=self.bind("value_1")), weight=4, margin=3)
```


```python 
vert_grid.add(
    Text(text="Center aligned text with a large margin."),
    margin=(10, 10, 30, 5),  # (left,right,top,below)
    align_horizontal=AlignHorizontal.center,)
```

Installation

  • Create a virtual env, activate it and pip install aio_wx_widgets

Running the demo

  • Install the libary as described above.
  • clone the repo.
  • from the activated virtualenv: python -m demo

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

aio_wx_widgets-1.3.7.tar.gz (82.1 kB view details)

Uploaded Source

Built Distribution

aio_wx_widgets-1.3.7-py3-none-any.whl (26.5 kB view details)

Uploaded Python 3

File details

Details for the file aio_wx_widgets-1.3.7.tar.gz.

File metadata

  • Download URL: aio_wx_widgets-1.3.7.tar.gz
  • Upload date:
  • Size: 82.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.25.1

File hashes

Hashes for aio_wx_widgets-1.3.7.tar.gz
Algorithm Hash digest
SHA256 bbcd1186eb1f5a1dd386af9b88cd21168cb585cf29072621f0cdb667ab1452b4
MD5 a840cc192b8607c27203a680424fdbf3
BLAKE2b-256 bc097fbc7d4556a740aced41f2d6cfc60930c37086f212e4001a112922138269

See more details on using hashes here.

File details

Details for the file aio_wx_widgets-1.3.7-py3-none-any.whl.

File metadata

File hashes

Hashes for aio_wx_widgets-1.3.7-py3-none-any.whl
Algorithm Hash digest
SHA256 bb4713e1a9393e5de8005e5120998913a42dedcd7c035bb12456cb82cc85e2f3
MD5 14c762b001731914fa60d03c0c00595a
BLAKE2b-256 5f237df70fe48004c3b4932a37ae8687bc574e37781c3fc3c006dfe36ac79978

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