aio_wx_widgets
Project description
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 Property binding from controller properties to the view.
# 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)
-
Proper Margins and alignment of items
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
Release history Release notifications | RSS feed
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.0.6.tar.gz
(24.2 kB
view details)
Built Distribution
File details
Details for the file aio_wx_widgets-1.0.6.tar.gz
.
File metadata
- Download URL: aio_wx_widgets-1.0.6.tar.gz
- Upload date:
- Size: 24.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: python-requests/2.25.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 20a707f00cc43c59f46c5021786e9140ee9ada8583e17021d5ca357de7e5e2b1 |
|
MD5 | 53b0f591e859b71f6a4e82d33d6d6ee5 |
|
BLAKE2b-256 | 5de11d51661c1bec3b8d2e8674417fb158fc2ffbabf351e162359daac267e892 |
File details
Details for the file aio_wx_widgets-1.0.6-py3-none-any.whl
.
File metadata
- Download URL: aio_wx_widgets-1.0.6-py3-none-any.whl
- Upload date:
- Size: 22.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: python-requests/2.25.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 76f408fab71cdd74bf2814a5ee194109bbd3763edb5a2d564deaf9fee4c46d38 |
|
MD5 | 76dc4b724231e7063189c367d031b278 |
|
BLAKE2b-256 | e94f67f9bb54b7a1d74743c03dec553cf4cd16fcbabc16ec14c8675b0810a7d4 |