当前位置:网站首页>Flet教程之 16 Tabs 选项卡控件 基础入门(教程含源码)
Flet教程之 16 Tabs 选项卡控件 基础入门(教程含源码)
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)
边栏推荐
猜你喜欢

使用MeterSphere让你的测试工作持续高效

聊聊SOC启动(十) 内核启动先导知识
![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]

Test the foundation of development, and teach you to prepare for a fully functional web platform environment

Talk about SOC startup (11) kernel initialization

技术分享 | 抓包分析 TCP 协议

Electron adding SQLite database

Using ENSP to do MPLS pseudo wire test

About the application of writing shell script JSON in JMeter

The road to success in R & D efficiency of 1000 person Internet companies
随机推荐
VIM command mode and input mode switching
Talk about SOC startup (11) kernel initialization
Android interview knowledge points
STM32 entry development write DS18B20 temperature sensor driver (read ambient temperature, support cascade)
[encapsulation of time format tool functions]
使用引用
Electron adding SQLite database
[Yugong series] go teaching course 005 variables in July 2022
R語言使用magick包的image_mosaic函數和image_flatten函數把多張圖片堆疊在一起形成堆疊組合圖像(Stack layers on top of each other)
In SQL, I want to set foreign keys. Why is this problem
The running kubernetes cluster wants to adjust the network segment address of pod
Internet Protocol
通过 Play Integrity API 的 nonce 字段提高应用安全性
How to write test cases for test coupons?
Half of the people don't know the difference between for and foreach???
There are ways to improve self-discipline and self-control
Technology sharing | packet capturing analysis TCP protocol
Web端自动化测试失败的原因
STM32F1与STM32CubeIDE编程实例-315M超再生无线遥控模块驱动
本地navicat连接liunx下的oracle报权限不足