当前位置:网站首页>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)
边栏推荐
- Briefly introduce closures and some application scenarios
- Stm32f1 and stm32subeide programming example -max7219 drives 8-bit 7-segment nixie tube (based on SPI)
- 问下flinkcdc2.2.0的版本,支持并发,这个并发是指多并行度吗,现在发现,mysqlcdc全
- 【最短路】Acwing1128信使:floyd最短路
- 科普达人丨一文弄懂什么是云计算?
- Enclosed please find. Net Maui's latest learning resources
- Learning notes | data Xiaobai uses dataease to make a large data screen
- 深度学习秋招面试题集锦(一)
- VIM command mode and input mode switching
- Some opinions and code implementation of Siou loss: more powerful learning for bounding box regression zhora gevorgyan
猜你喜欢
禁锢自己的因素,原来有这么多
The Oracle message permission under the local Navicat connection liunx is insufficient
使用MeterSphere让你的测试工作持续高效
普通测试年薪15w,测试开发年薪30w+,二者差距在哪?
There are so many factors that imprison you
Drive HC based on de2115 development board_ SR04 ultrasonic ranging module [source code attached]
Automated testing framework
About the application of writing shell script JSON in JMeter
一起探索云服务之云数据库
STM32F1与STM32CubeIDE编程实例-MAX7219驱动8位7段数码管(基于SPI)
随机推荐
正在運行的Kubernetes集群想要調整Pod的網段地址
核舟记(一):当“男妈妈”走进现实,生物科技革命能解放女性吗?
Have you ever met flick Oracle CDC, read a table without update operation, and read it repeatedly every ten seconds
The running kubernetes cluster wants to adjust the network segment address of pod
Solve the problem that vscode can only open two tabs
科普达人丨一文弄懂什么是云计算?
There are so many factors that imprison you
Qt 实现容器的DELETE的方式
sql里,我想设置外键,为什么出现这个问题
Programming examples of stm32f1 and stm32subeide -315m super regenerative wireless remote control module drive
Two week selection of tdengine community issues | phase II
[Yugong series] go teaching course 005 variables in July 2022
Complete collection of common error handling in MySQL installation
Technology sharing | packet capturing analysis TCP protocol
Verilog realizes nixie tube display driver [with source code]
'module 'object is not callable error
The Oracle message permission under the local Navicat connection liunx is insufficient
学习笔记|数据小白使用DataEase制作数据大屏
普通测试年薪15w,测试开发年薪30w+,二者差距在哪?
技术分享 | 抓包分析 TCP 协议