当前位置:网站首页>Kivy tutorial of setting the size and background of the form (tutorial includes source code)
Kivy tutorial of setting the size and background of the form (tutorial includes source code)
2022-07-07 04:29:00 【Knowledge fatness】
Running effect

Window size
Usually, the application that adjusts the properties of the desktop is the window size . The following changes have absolutely no impact on mobile devices .
It also allows users to display , By our default . To allocate the initial window size , Please insert the next code snippet directly above the read line from kivy.core.window import Window.Window It is important to apply these settings before importing objects ; otherwise , They will have no effect :
from kivy.config import Config
Config.set('graphics', 'width', '960')
Config.set('graphics', 'height', '540') # 16:9
Besides , You may want to disable window resizing by adding this line :
Config.set('graphics', 'resizable', '0')
Please, unless you have a good reason , Otherwise don't do this , Because it is usually a bad idea to keep these trivial custom settings away from users , And it is easy to destroy the overall user experience . It's tempting to build pixel perfect applications at one resolution , But many of your customers ( Especially mobile users ) Not happy . On the other hand ,Kivy Layout makes it acceptable to build an extensible interface .
Project completion source code
from kivy.app import App
from kivy.base 边栏推荐
- 论文上岸攻略 | 如何快速入门学术论文写作
- Formation continue en robotique (automatisation) - 2022 -
- 超越Postman,新一代国产调试工具Apifox,用起来够优雅
- Win11图片打不开怎么办?Win11无法打开图片的修复方法
- Digital chemical plant management system based on Virtual Simulation Technology
- What is CGI, IIS, and VPS "suggested collection"
- See Gardenia minor
- 数学分析_笔记_第10章:含参变量积分
- SQL where multiple field filtering
- 高薪程序员&面试题精讲系列120之Redis集群原理你熟悉吗?如何保证Redis的高可用(上)?
猜你喜欢
![[team learning] [34 issues] scratch (Level 2)](/img/29/8383d753eedcffd874bc3f0194152a.jpg)
[team learning] [34 issues] scratch (Level 2)

案例大赏:英特尔携众多合作伙伴推动多领域AI产业创新发展

2022 electrician cup question B analysis of emergency materials distribution under 5g network environment

Deeply cultivate the developer ecosystem, accelerate the innovation and development of AI industry, and Intel brings many partners together

Ssm+jsp realizes the warehouse management system, and the interface is called an elegant interface

EasyCVR无法使用WebRTC进行播放,该如何解决?
![[record of question brushing] 2 Add two numbers](/img/3b/f8fec79dc2b5088ac57f8d7a18aea6.png)
[record of question brushing] 2 Add two numbers

SSM+JSP实现企业管理系统(OA管理系统源码+数据库+文档+PPT)

EasyCVR平台接入RTMP协议,接口调用提示获取录像错误该如何解决?

测试/开发程序员怎么升职?从无到有,从薄变厚.......
随机推荐
案例大赏:英特尔携众多合作伙伴推动多领域AI产业创新发展
ESG Global Leaders Summit | Intel Wang Rui: coping with global climate challenges with the power of science and technology
Unit test asp Net MVC 4 Application - unit testing asp Net MVC 4 apps thoroughly
Opencv third party Library
How do test / development programmers get promoted? From nothing, from thin to thick
Learn how to use js to merge two objects into one object assign()
史上最全MongoDB之Mongo Shell使用
The easycvr platform is connected to the RTMP protocol, and the interface call prompts how to solve the error of obtaining video recording?
Deeply cultivate the developer ecosystem, accelerate the innovation and development of AI industry, and Intel brings many partners together
Have you got the same "artifact" of cross architecture development praised by various industry leaders?
测试/开发程序员怎么升职?从无到有,从薄变厚.......
See Gardenia minor
The most complete security certification of mongodb in history
Comment les tests de logiciels sont - ils effectués sur le site Web? Testez la stratégie!
MySQL null value processing and value replacement
Use br to back up tidb cluster to GCS
JetBrain Pycharm的一系列快捷键
This "advanced" technology design 15 years ago makes CPU shine in AI reasoning
史上最全MongoDB之部署篇
EasyCVR集群重启导致其他服务器设备通道状态离线情况的优化