当前位置:网站首页>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)
边栏推荐
- 测试开发基础,教你做一个完整功能的Web平台之环境准备
- Qt 实现容器的DELETE的方式
- 网络协议 概念
- LeetCode - 面试题17.24 最大子矩阵
- How to add aplayer music player in blog
- 通过 Play Integrity API 的 nonce 字段提高应用安全性
- 对比学习之 Unsupervised Learning of Visual Features by Contrasting Cluster Assignments
- R language Visual facet chart, hypothesis test, multivariable grouping t-test, visual multivariable grouping faceting boxplot, and add significance levels and jitter points
- 如何在博客中添加Aplayer音乐播放器
- Blog moved to Zhihu
猜你喜欢
RationalDMIS2022 高级编程宏程序
Automated testing framework
Excel公式知多少?
技术分享 | 抓包分析 TCP 协议
聊聊SOC启动(九) 为uboot 添加新的board
Zhou Yajin, a top safety scholar of Zhejiang University, is a curiosity driven activist
oracle常见锁表处理方式
The running kubernetes cluster wants to adjust the network segment address of pod
高考作文,高频提及科技那些事儿……
OneDNS助力高校行业网络安全
随机推荐
面试被问到了解哪些开发模型?看这一篇就够了
Poor math students who once dropped out of school won the fields award this year
Half of the people don't know the difference between for and foreach???
Graduation season | keep company with youth and look forward to the future together!
Distributed database master-slave configuration (MySQL)
R语言使用quantile函数计算评分值的分位数(20%、40%、60%、80%)、使用逻辑操作符将对应的分位区间(quantile)编码为分类值生成新的字段、strsplit函数将学生的名和姓拆分
R language Visual facet chart, hypothesis test, multivariable grouping t-test, visual multivariable grouping faceting boxplot, and add significance levels and jitter points
使用MeterSphere让你的测试工作持续高效
【时间格式工具函数的封装】
【系统设计】指标监控和告警系统
Use references
Suggestions on one-stop development of testing life
STM32入门开发 采用IIC硬件时序读写AT24C08(EEPROM)
竟然有一半的人不知道 for 与 foreach 的区别???
Neural approvals to conversational AI (1)
How to write test cases for test coupons?
Two week selection of tdengine community issues | phase II
CMU15445 (Fall 2019) 之 Project#2 - Hash Table 详解
互联网协议
Various uses of vim are very practical. I learned and summarized them in my work