当前位置:网站首页>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.
边栏推荐
- Example of batch update statement combining update and inner join in SQL Server
- Unity tips - draw aiming Center
- Xin'an Second Edition: Chapter 26 big data security demand analysis and security protection engineering learning notes
- 重磅!蚂蚁开源可信隐私计算框架“隐语”,主流技术灵活组装、开发者友好分层设计...
- The NTFS format converter (convert.exe) is missing from the current system
- Guidelines for preparing for the 2022 soft exam information security engineer exam
- 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
- 传统家装有落差,VR全景家装让你体验新房落成效果
- MySQL error reporting solution
- Pyspark operator processing spatial data full parsing (4): let's talk about spatial operations first
猜你喜欢
Interview assault 63: how to remove duplication in MySQL?
重磅!蚂蚁开源可信隐私计算框架“隐语”,主流技术灵活组装、开发者友好分层设计...
The easycvr authorization expiration page cannot be logged in. How to solve it?
Concept and basic knowledge of network layering
Summary of Android interview questions of Dachang in 2022 (I) (including answers)
EasyCVR授权到期页面无法登录,该如何解决?
What is the reason why the video cannot be played normally after the easycvr access device turns on the audio?
Reppoints: advanced order of deformable convolution
Awk command exercise
Video fusion cloud platform easycvr adds multi-level grouping, which can flexibly manage access devices
随机推荐
偷窃他人漏洞报告变卖成副业,漏洞赏金平台出“内鬼”
The solution that flutterweb browser cannot be rolled back after refreshing
【MySQL入门】第一话 · 初入“数据库”大陆
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
Basic configuration and use of spark
node の SQLite
Virtual machine startup prompt probing EDD (edd=off to disable) error
Pourquoi Li shufu a - t - il construit son téléphone portable?
Interview assault 63: how to remove duplication in MySQL?
kivy教程之在 Kivy 中支持中文以构建跨平台应用程序(教程含源码)
Wechat applet obtains mobile number
Xin'an Second Edition: Chapter 26 big data security demand analysis and security protection engineering learning notes
[rapid environment construction] openharmony 10 minute tutorial (cub pie)
C# NanoFramework 点灯和按键 之 ESP32
Unity tips - draw aiming Center
开源与安全的“冰与火之歌”
C语言通过指针交换两个数
远程代码执行渗透测试——B模块测试
酷雷曼多种AI数字人形象,打造科技感VR虚拟展厅
Solution qui ne peut pas être retournée après la mise à jour du navigateur Web flutter