当前位置:网站首页>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)
边栏推荐
- Audit migration
- CMU15445 (Fall 2019) 之 Project#2 - Hash Table 详解
- Electron adding SQLite database
- Automated testing framework
- OneDNS助力高校行业网络安全
- 关于测试人生的一站式发展建议
- QT | multiple windows share a prompt box class
- Electron adding SQLite database
- R language uses the quantile function to calculate the quantile of the score value (20%, 40%, 60%, 80%), uses the logical operator to encode the corresponding quantile interval (quantile) into the cla
- Talk about SOC startup (x) kernel startup pilot knowledge
猜你喜欢
浙江大学周亚金:“又破又立”的顶尖安全学者,好奇心驱动的行动派
Leetcode - interview question 17.24 maximum submatrix
CMU15445 (Fall 2019) 之 Project#2 - Hash Table 详解
学习笔记|数据小白使用DataEase制作数据大屏
sql里,我想设置外键,为什么出现这个问题
相机标定(1): 单目相机标定及张正友标定基本原理
Onedns helps college industry network security
使用MeterSphere让你的测试工作持续高效
What is cloud computing?
普通测试年薪15w,测试开发年薪30w+,二者差距在哪?
随机推荐
對比學習之 Unsupervised Learning of Visual Features by Contrasting Cluster Assignments
Use references
Android 面试知识点
Zhou Yajin, a top safety scholar of Zhejiang University, is a curiosity driven activist
Neural approvals to conversational AI (1)
Graduation season | keep company with youth and look forward to the future together!
浙江大学周亚金:“又破又立”的顶尖安全学者,好奇心驱动的行动派
Debezium同步之Debezium架构详解
QT | multiple windows share a prompt box class
网络协议 概念
Unsupervised learning of visual features by contracting cluster assignments
Creative information was surveyed by 2 institutions: greatdb database has been deployed in 9 places
EasyUI learn to organize notes
STM32入门开发 NEC红外线协议解码(超低成本无线传输方案)
STM32入门开发 编写DS18B20温度传感器驱动(读取环境温度、支持级联)
La voie du succès de la R & D des entreprises Internet à l’échelle des milliers de personnes
STM32 entry development uses IIC hardware timing to read and write AT24C08 (EEPROM)
Programming examples of stm32f1 and stm32subeide -315m super regenerative wireless remote control module drive
本地navicat连接liunx下的oracle报权限不足
软件设计之——“高内聚低耦合”