当前位置:网站首页>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.
边栏推荐
- 视频融合云平台EasyCVR增加多级分组,可灵活管理接入设备
- Alertmanager sends the alarm email and specifies it as the Alibaba mailbox of the company
- Vscode matches and replaces the brackets
- FlutterWeb瀏覽器刷新後無法回退的解决方案
- Wechat applet obtains mobile number
- [getting started with MySQL] fourth, explore operators in MySQL with Kiko
- Concept and basic knowledge of network layering
- EasyCVR电子地图中设备播放器loading样式的居中对齐优化
- Nodejs developer roadmap 2022 zero foundation Learning Guide
- Grafana 9 is officially released, which is easier to use and more cool!
猜你喜欢

2022年大厂Android面试题汇总(二)(含答案)

Summary of Android interview questions of Dachang in 2022 (II) (including answers)
![[translation] principle analysis of X Window Manager (I)](/img/40/6e15e1acebb47061d6e0e4c8ff82ea.jpg)
[translation] principle analysis of X Window Manager (I)

EasyCVR平台通过接口编辑通道出现报错“ID不能为空”,是什么原因?

In terms of byte measurement with an annual salary of 30W, automated testing can be learned in this way

Uipath browser performs actions in the new tab

It doesn't make sense without a distributed gateway

SQL statement optimization, order by desc speed optimization

Alibaba brand data bank: introduction to the most complete data bank

Flink parsing (III): memory management
随机推荐
遠程代碼執行滲透測試——B模塊測試
Xin'an Second Edition; Chapter 11 learning notes on the principle and application of network physical isolation technology
Awk command exercise
JMeter interface test response data garbled
Interview assault 63: how to remove duplication in MySQL?
Shell input a string of numbers to determine whether it is a mobile phone number
Pytorch extract middle layer features?
How to submit data through post
[rapid environment construction] openharmony 10 minute tutorial (cub pie)
Hongmeng introduction and development environment construction
Easy introduction to SQL (1): addition, deletion, modification and simple query
VR panoramic wedding helps couples record romantic and beautiful scenes
Flink parsing (V): state and state backend
Openharmony developer documentation open source project
Automatic operation and maintenance sharp weapon ansible Playbook
Vscode matches and replaces the brackets
pip install pyodbc : ERROR: Command errored out with exit status 1
Nodejs 开发者路线图 2022 零基础学习指南
Grafana 9 is officially released, which is easier to use and more cool!
Spark calculation operator and some small details in liunx