当前位置:网站首页>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)
边栏推荐
- 相机标定(1): 单目相机标定及张正友标定基本原理
- 一度辍学的数学差生,获得今年菲尔兹奖
- Talk about SOC startup (VI) uboot startup process II
- Talk about SOC startup (11) kernel initialization
- 清华姚班程序员,网上征婚被骂?
- Talk about SOC startup (VII) uboot startup process III
- Enclosed please find. Net Maui's latest learning resources
- What is high cohesion and low coupling?
- Reasons for the failure of web side automation test
- 总结了200道经典的机器学习面试题(附参考答案)
猜你喜欢

如何在博客中添加Aplayer音乐播放器
![Drive HC based on de2115 development board_ SR04 ultrasonic ranging module [source code attached]](/img/ed/29d6bf21f857ec925bf425ad594e36.png)
Drive HC based on de2115 development board_ SR04 ultrasonic ranging module [source code attached]

【最短路】ACwing 1127. 香甜的黄油(堆优化的dijsktra或spfa)

普通测试年薪15w,测试开发年薪30w+,二者差距在哪?

聊聊SOC启动(六)uboot启动流程二

Cmu15445 (fall 2019) project 2 - hash table details

Electron adding SQLite database

Distributed database master-slave configuration (MySQL)

聊聊SOC启动(七) uboot启动流程三

How to write test cases for test coupons?
随机推荐
Qt 实现容器的DELETE的方式
electron添加SQLite数据库
Automated testing framework
Ask about the version of flinkcdc2.2.0, which supports concurrency. Does this concurrency mean Multiple Parallelism? Now I find that mysqlcdc is full
一起探索云服务之云数据库
关于在云服务器上(这里用腾讯云)安装mysql8.0并使本地可以远程连接的方法
请查收.NET MAUI 的最新学习资源
Complete collection of common error handling in MySQL installation
audit 移植
Software design - "high cohesion and low coupling"
R language Visual facet chart, hypothesis test, multivariable grouping t-test, visual multivariable grouping faceting boxplot, and add significance levels and jitter points
EasyUI learn to organize notes
Android interview knowledge points
What is high cohesion and low coupling?
LeetCode - 面试题17.24 最大子矩阵
深度学习秋招面试题集锦(一)
Electron adding SQLite database
Activity lifecycle
基于华为云IOT设计智能称重系统(STM32)
关于测试人生的一站式发展建议