当前位置:网站首页>Fleet tutorial 13 basic introduction to listview's most commonly used scroll controls (tutorial includes source code)
Fleet tutorial 13 basic introduction to listview's most commonly used scroll controls (tutorial includes source code)
2022-07-06 17:51:00 【Knowledge fatness】
Flet What is it?
Flet It's a framework , Make it easy for you to build real-time in your favorite language Web、 Mobile and desktop applications , And share them safely with your team . No front-end experience .
What is? ListView
ListView Is the most commonly used scroll control . It displays its children one by one in the scrolling direction . On the cross axis , Children need to be filled ListView.
Combat code
from time import sleep
import flet
from flet import ListView, Page, Text
def main(page: Page):
page.title = "Auto-scrolling ListView"
lv = ListView(expand=1, spacing=10, padding=20, auto_scroll=True)
count = 1
for i in range(0, 60):
lv.controls.append(Text(f"Line {count}"))
count += 1
page.add(lv)
for i in range(0, 60):
sleep(1)
lv.controls.append(Text(f"Line {count}"))
count += 1
page.update()
flet.app(target=main)
Parameters
controls
Control To be in ListView Shown in s list .horizontal
True Horizontal layout ListView project .spacing
ListView Between items Divider Height . If not specified , Then there is no space between items .divider_thickness
If it is greater than 0 be Divider Used as a ListView The spacing between items .padding
Amount of space to insert subitems .
For more information and possible values , Please see the Container.padding attribute .
auto_scroll
True If the child is updated, the scroll bar should automatically move its position to the end .item_extent
horizontal Fixed height or width of the item used to optimize rendering ( about ListView).first_item_prototype
True If the size of the first item should be used for all other items “ Prototype ”, That is, their height or width will be the same as the first item . The default is False.
边栏推荐
- Pytest learning ----- pytest operation mode and pre post packaging of interface automation testing
- Flink parsing (V): state and state backend
- [elastic] elastic lacks xpack and cannot create template unknown setting index lifecycle. name index. lifecycle. rollover_ alias
- 【Elastic】Elastic缺少xpack无法创建模板 unknown setting index.lifecycle.name index.lifecycle.rollover_alias
- Flink parsing (VII): time window
- [introduction to MySQL] the first sentence · first time in the "database" Mainland
- 8位MCU跑RTOS有没有意义?
- 开源与安全的“冰与火之歌”
- 面试突击63:MySQL 中如何去重?
- 在一台服务器上部署多个EasyCVR出现报错“Press any to exit”,如何解决?
猜你喜欢
【ASM】字节码操作 ClassWriter 类介绍与使用
Flink parsing (VII): time window
C # nanoframework lighting and key esp32
Unity tips - draw aiming Center
Reppoints: advanced order of deformable convolution
重磅!蚂蚁开源可信隐私计算框架“隐语”,主流技术灵活组装、开发者友好分层设计...
PyTorch 提取中间层特征?
C# NanoFramework 点灯和按键 之 ESP32
PySpark算子处理空间数据全解析(5): 如何在PySpark里面使用空间运算接口
Virtual machine startup prompt probing EDD (edd=off to disable) error
随机推荐
Distinguish between basic disk and dynamic disk RAID disk redundant array
面试突击63:MySQL 中如何去重?
Getting started with pytest ----- test case pre post, firmware
Summary of Android interview questions of Dachang in 2022 (I) (including answers)
Xin'an Second Edition: Chapter 23 cloud computing security requirements analysis and security protection engineering learning notes
Why should Li Shufu personally take charge of building mobile phones?
Getting started with pytest ----- test case rules
Unity小技巧 - 绘制瞄准准心
Uipath browser performs actions in the new tab
scratch疫情隔离和核酸检测模拟 电子学会图形化编程scratch等级考试三级真题和答案解析2022年6月
C# NanoFramework 点灯和按键 之 ESP32
EasyCVR电子地图中设备播放器loading样式的居中对齐优化
Hongmeng introduction and development environment construction
MySQL stored procedure
[introduction to MySQL] the first sentence · first time in the "database" Mainland
Pyspark operator processing spatial data full parsing (4): let's talk about spatial operations first
Xin'an Second Edition: Chapter 26 big data security demand analysis and security protection engineering learning notes
OpenCV中如何使用滚动条动态调整参数
Debug xv6
Error: Publish of Process project to Orchestrator failed. The operation has timed out.