当前位置:网站首页>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.
边栏推荐
- Pourquoi Li shufu a - t - il construit son téléphone portable?
- Error: Publish of Process project to Orchestrator failed. The operation has timed out.
- [elastic] elastic lacks xpack and cannot create template unknown setting index lifecycle. name index. lifecycle. rollover_ alias
- How to output special symbols in shell
- 历史上的今天:Google 之母出生;同一天诞生的两位图灵奖先驱
- Grafana 9 正式发布,更易用,更酷炫了!
- PyTorch 提取中间层特征?
- Sqoop I have everything you want
- The art of Engineering (3): do not rely on each other between functions of code robustness
- Basic configuration and use of spark
猜你喜欢
EasyCVR电子地图中设备播放器loading样式的居中对齐优化
Chrome prompts the solution of "your company management" (the startup page is bound to the company's official website and cannot be modified)
【Elastic】Elastic缺少xpack无法创建模板 unknown setting index.lifecycle.name index.lifecycle.rollover_alias
C# NanoFramework 点灯和按键 之 ESP32
Why should Li Shufu personally take charge of building mobile phones?
PyTorch 提取中间层特征?
It doesn't make sense without a distributed gateway
C语言通过指针交换两个数
Virtual machine startup prompt probing EDD (edd=off to disable) error
Unity小技巧 - 绘制瞄准准心
随机推荐
PyTorch 提取中间层特征?
Flink parsing (V): state and state backend
The most complete tcpdump and Wireshark packet capturing practice in the whole network
Cool Lehman has a variety of AI digital human images to create a vr virtual exhibition hall with a sense of technology
偷窃他人漏洞报告变卖成副业,漏洞赏金平台出“内鬼”
Nodejs 开发者路线图 2022 零基础学习指南
The easycvr platform reports an error "ID cannot be empty" through the interface editing channel. What is the reason?
Openharmony developer documentation open source project
What is the reason why the video cannot be played normally after the easycvr access device turns on the audio?
The problem of "syntax error" when uipath executes insert statement is solved
BearPi-HM_ Nano development board "flower protector" case
FlutterWeb浏览器刷新后无法回退的解决方案
Sqoop I have everything you want
connection reset by peer
Unity tips - draw aiming Center
【MySQL入门】第三话 · MySQL中常见的数据类型
李書福為何要親自掛帥造手機?
Xin'an Second Edition: Chapter 23 cloud computing security requirements analysis and security protection engineering learning notes
The art of Engineering (3): do not rely on each other between functions of code robustness
Debug xv6