当前位置:网站首页>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)
边栏推荐
- Talk about SOC startup (11) kernel initialization
- Test the foundation of development, and teach you to prepare for a fully functional web platform environment
- Electron adding SQLite database
- 测试开发基础,教你做一个完整功能的Web平台之环境准备
- R Language Using Image of magick package Mosaic Function and Image La fonction flatten empile plusieurs images ensemble pour former des couches empilées sur chaque autre
- STM32入门开发 编写DS18B20温度传感器驱动(读取环境温度、支持级联)
- 在我有限的软件测试经历里,一段专职的自动化测试经验总结
- 自动化测试框架
- How much do you know about excel formula?
- The Oracle message permission under the local Navicat connection liunx is insufficient
猜你喜欢

MySQL安装常见报错处理大全

Tsinghua Yaoban programmers, online marriage was scolded?

Learning notes | data Xiaobai uses dataease to make a large data screen

Activity lifecycle

Le Cluster kubernets en cours d'exécution veut ajuster l'adresse du segment réseau du pod

对比学习之 Unsupervised Learning of Visual Features by Contrasting Cluster Assignments

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

Talk about SOC startup (IX) adding a new board to uboot

Stm32f1 and stm32subeide programming example -max7219 drives 8-bit 7-segment nixie tube (based on SPI)

关于测试人生的一站式发展建议
随机推荐
Drive HC based on de2115 development board_ SR04 ultrasonic ranging module [source code attached]
Case study of Jinshan API translation function based on retrofit framework
Eth trunk link switching delay is too high
解决VSCode只能开两个标签页的问题
Using ENSP to do MPLS pseudo wire test
.NET MAUI 性能提升
Learning notes | data Xiaobai uses dataease to make a large data screen
Cmu15445 (fall 2019) project 2 - hash table details
EasyUI learn to organize notes
Qt 实现容器的DELETE的方式
Graduation season | keep company with youth and look forward to the future together!
Talk about SOC startup (IX) adding a new board to uboot
Ask about the version of flinkcdc2.2.0, which supports concurrency. Does this concurrency mean Multiple Parallelism? Now I find that mysqlcdc is full
Software design - "high cohesion and low coupling"
Internet Protocol
【时间格式工具函数的封装】
Talk about SOC startup (11) kernel initialization
VIM command mode and input mode switching
Blog moved to Zhihu
通过环境变量将 Pod 信息呈现给容器