当前位置:网站首页>Flet教程之 15 GridView 基础入门(教程含源码)
Flet教程之 15 GridView 基础入门(教程含源码)
2022-07-07 09:46:00 【知识大胖】
Flet是什么
Flet 是一个框架,使您能够轻松地以您喜欢的语言构建实时 Web、移动和桌面应用程序,并与您的团队安全地共享它们。无需前端经验。
什么是GridView
可滚动的二维控件数组。
实战代码
import flet
from flet import Image, Page, GridView, border_radius
def main(page: Page):
page.title = "GridView Example"
page.theme_mode = "dark"
page.padding = 50
page.update()
images = GridView(
expand=1,
runs_count=5,
max_extent=150,
child_aspect_ratio=1.0,
spacing=5,
run_spacing=5,
)
page.add(images)
for i in range(0, 60):
images.controls.append(
Image(
src=f"https://picsum.photos/150/150?{i}",
fit="none",
repeat="noRepeat",
border_radius=border_radius.all(10),
)
)
page.update()
flet.app(target=main, view=flet.WEB_BROWSER)
边栏推荐
- Poor math students who once dropped out of school won the fields award this year
- Stm32f1 and stm32subeide programming example -max7219 drives 8-bit 7-segment nixie tube (based on SPI)
- 总结了200道经典的机器学习面试题(附参考答案)
- STM32入门开发 采用IIC硬件时序读写AT24C08(EEPROM)
- 聊聊SOC启动(九) 为uboot 添加新的board
- 技术分享 | 抓包分析 TCP 协议
- Distributed database master-slave configuration (MySQL)
- Software design - "high cohesion and low coupling"
- [Yugong series] go teaching course 005 variables in July 2022
- 常用sql语句整理:mysql
猜你喜欢
Cmu15445 (fall 2019) project 2 - hash table details
Onedns helps college industry network security
本地navicat连接liunx下的oracle报权限不足
禁锢自己的因素,原来有这么多
[system design] index monitoring and alarm system
正在運行的Kubernetes集群想要調整Pod的網段地址
RationalDMIS2022 高级编程宏程序
技术分享 | 抓包分析 TCP 协议
核舟记(一):当“男妈妈”走进现实,生物科技革命能解放女性吗?
测试优惠券要怎么写测试用例?
随机推荐
正在运行的Kubernetes集群想要调整Pod的网段地址
面试被问到了解哪些开发模型?看这一篇就够了
The database synchronization tool dbsync adds support for mongodb and es
一起探索云服务之云数据库
Android 面试知识点
博客搬家到知乎
问下flinkcdc2.2.0的版本,支持并发,这个并发是指多并行度吗,现在发现,mysqlcdc全
Briefly introduce closures and some application scenarios
Network protocol concept
Internet Protocol
千人規模互聯網公司研發效能成功之路
0.96 inch IIC LCD driver based on stc8g1k08
sql里,我想设置外键,为什么出现这个问题
The road to success in R & D efficiency of 1000 person Internet companies
Qt|多个窗口共有一个提示框类
QT | multiple windows share a prompt box class
Distributed database master-slave configuration (MySQL)
Stm32f1 and stm32subeide programming example -max7219 drives 8-bit 7-segment nixie tube (based on SPI)
Zhou Yajin, a top safety scholar of Zhejiang University, is a curiosity driven activist
Ask about the version of flinkcdc2.2.0, which supports concurrency. Does this concurrency mean Multiple Parallelism? Now I find that mysqlcdc is full