aio_wx_widgets
项目描述
aio_wx_widgets
使用MVC模型的Wx python应用程序结构。正在开发中,需要时添加小部件。请参阅示例文件夹以获取使用方法。
特性
- 使用上下文管理器添加小部件。
- 从控制器属性到视图的双向或单向属性绑定。
- 项目的正确边距和对齐
下面的示例可能有些过时,但可以提供一个大致的概念。请参阅示例以获取更多信息。
```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,)
```
安装
- 创建一个虚拟环境,激活它并
pip install aio_wx_widgets
运行示例
- 按照上述说明安装库。
- 克隆存储库。
- 在激活的虚拟环境中:
python -m demo
项目详情
下载文件
下载适用于您的平台文件。如果您不确定选择哪个,请了解更多关于安装包的信息。
源分布
aio_wx_widgets-1.3.10.tar.gz (83.0 kB 查看哈希值)
构建版本
aio_wx_widgets-1.3.10-py3-none-any.whl (27.6 kB 查看哈希值)
关闭
aio_wx_widgets-1.3.10.tar.gz 的哈希值
算法 | 哈希摘要 | |
---|---|---|
SHA256 | c95463ae62b33fd09c7fc12da49fd245ac5fa3dc31c7412a5bccc37a9c4a6d49 |
|
MD5 | 5e27930895c0d6cdf1aaa177774b93b2 |
|
BLAKE2b-256 | 44a1ebd0721f01707390fa4b36008f6566c3e7508a7b4880f7bccbe1b0457524 |
关闭
aio_wx_widgets-1.3.10-py3-none-any.whl 的哈希值
算法 | 哈希摘要 | |
---|---|---|
SHA256 | a858d87b4cd201262a8d6ff3cfa9dde416ef292e9ee0a332ba2b765c653a8e4b |
|
MD5 | bd99d783845b25caeb9e92bcb28a38e4 |
|
BLAKE2b-256 | 0786ee5db799c0349cc7630cb98391263e37b7fc77933b1df3effafbfb671d73 |