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 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


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.5.tar.gz (18.0 kB view details)

Uploaded Source

Built Distribution

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

aio_wx_widgets-0.0.5-py3-none-any.whl (15.3 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for aio_wx_widgets-0.0.5.tar.gz
Algorithm Hash digest
SHA256 78b59e802f6c2c9a674499266e7edf83b5b1409c9be5620b9177dd86da4cafd2
MD5 675de2112a0d1d766df47bd21f6d9b04
BLAKE2b-256 ff27fd312551994d051f3225db820b2933b9d034073fb65b78daa92b73511049

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for aio_wx_widgets-0.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 2e0bb809e0310f5faec8f48f5c3d3a9a96daa106f80405447d8dcf9eda0633c2
MD5 4cfcc90372b1231378dacaa6994c3b24
BLAKE2b-256 cd46a0bcd504546213a02386f8e4c6c5183e4b6f8ceb9c22d37a01c24003f6f8

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