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-0.0.8.tar.gz
(19.1 kB
view details)
Built Distribution
File details
Details for the file aio_wx_widgets-0.0.8.tar.gz
.
File metadata
- Download URL: aio_wx_widgets-0.0.8.tar.gz
- Upload date:
- Size: 19.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: python-requests/2.24.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bec22be026160fedf69e1a465953be98fdfbb7e181e86cd89a6d7085d602b06b |
|
MD5 | 1ad00fe7db7dff847de0529ef9ef1e09 |
|
BLAKE2b-256 | 0604c6dc7c9d90f017e650fb610033c7ceae66c6f9b255e87b1d1b199711005f |
File details
Details for the file aio_wx_widgets-0.0.8-py3-none-any.whl
.
File metadata
- Download URL: aio_wx_widgets-0.0.8-py3-none-any.whl
- Upload date:
- Size: 15.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: python-requests/2.24.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a9f0a44cf141f22987ca9a4761f8fb16185bf5535b44639829b82aa777972412 |
|
MD5 | 9305ccf02ae6b7483ef5a72cb2f733bb |
|
BLAKE2b-256 | 87dba55a5c9e983a1be6116e7028b9124ecbdf13d941389f37430713f13a258d |