当前位置:网站首页>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.
边栏推荐
- The art of Engineering (3): do not rely on each other between functions of code robustness
- The solution that flutterweb browser cannot be rolled back after refreshing
- C# NanoFramework 点灯和按键 之 ESP32
- Solid principle
- BearPi-HM_ Nano development environment
- FlutterWeb瀏覽器刷新後無法回退的解决方案
- pip install pyodbc : ERROR: Command errored out with exit status 1
- Video fusion cloud platform easycvr adds multi-level grouping, which can flexibly manage access devices
- 学 SQL 必须了解的 10 个高级概念
- kivy教程之在 Kivy 中支持中文以构建跨平台应用程序(教程含源码)
猜你喜欢
2021-03-22 "display login screen during recovery" can't be canceled. The appearance of lock screen interface leads to the solution that the remotely connected virtual machine can't work normally
Vscode replaces commas, or specific characters with newlines
2022年大厂Android面试题汇总(二)(含答案)
node の SQLite
Basic configuration and use of spark
OliveTin能在网页上安全运行shell命令(上)
78 岁华科教授逐梦 40 载,国产数据库达梦冲刺 IPO
Virtual machine startup prompt probing EDD (edd=off to disable) error
2022年大厂Android面试题汇总(一)(含答案)
基于STM32+华为云IOT设计的智能路灯
随机推荐
分布式不来点网关都说不过去
Binary search strategy
【MySQL入门】第一话 · 初入“数据库”大陆
MySQL 8 sub database and table backup database shell script
Xin'an Second Edition: Chapter 24 industrial control safety demand analysis and safety protection engineering learning notes
Getting started with pytest ----- allow generate report
Pytest learning ----- detailed explanation of the request for interface automation test
Concept and basic knowledge of network layering
李书福为何要亲自挂帅造手机?
Solr appears write Lock, solrexception: could not get leader props in the log
酷雷曼多种AI数字人形象,打造科技感VR虚拟展厅
基于STM32+华为云IOT设计的智能路灯
[elastic] elastic lacks xpack and cannot create template unknown setting index lifecycle. name index. lifecycle. rollover_ alias
Smart street lamp based on stm32+ Huawei cloud IOT design
Hongmeng introduction and development environment construction
远程代码执行渗透测试——B模块测试
分布式(一致性协议)之领导人选举( DotNext.Net.Cluster 实现Raft 选举 )
sql语句优化,order by desc速度优化
Unity粒子特效系列-闪星星的宝箱
78 岁华科教授逐梦 40 载,国产数据库达梦冲刺 IPO