当前位置:网站首页>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 边栏推荐
- EasyUI export excel cannot download the method that the box pops up
- JS form get form & get form elements
- Golang calculates constellations and signs based on birthdays
- 史上最全MongoDB之部署篇
- 【自动化经验谈】自动化测试成长之路
- 英特尔David Tuhy:英特尔傲腾技术成功的原因
- 数学分析_笔记_第10章:含参变量积分
- Use br to back up tidb cluster to GCS
- C # use Siemens S7 protocol to read and write PLC DB block
- Video fusion cloud platform easycvr video Plaza left column list style optimization
猜你喜欢

On the 110th anniversary of Turing's birth, has the prediction of intelligent machine come true?

深耕开发者生态,加速AI产业创新发展 英特尔携众多合作伙伴共聚

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

测试/开发程序员怎么升职?从无到有,从薄变厚.......

AI landing new question type RPA + AI =?

Win11截图键无法使用怎么办?Win11截图键无法使用的解决方法

Video fusion cloud platform easycvr video Plaza left column list style optimization

Intel and Xinbu technology jointly build a machine vision development kit to jointly promote the transformation of industrial intelligence

用CPU方案打破内存墙?学PayPal堆傲腾扩容量,漏查欺诈交易量可降至1/30

The most complete security certification of mongodb in history
随机推荐
2022中青杯C题城市交通思路分析
EasyCVR集群版本添加RTSP设备提示服务器ID错误,该如何解决?
Break the memory wall with CPU scheme? Learn from PayPal to expand the capacity of aoteng, and the volume of missed fraud transactions can be reduced to 1/30
史上最全MongoDB之Mongo Shell使用
史上最全MongoDB之部署篇
The most complete security certification of mongodb in history
Golang calculates constellations and signs based on birthdays
【自动化经验谈】自动化测试成长之路
On the 110th anniversary of Turing's birth, has the prediction of intelligent machine come true?
[knife-4j quickly build swagger]
【刷题记录】2. 两数相加
機器人(自動化)課程的持續學習-2022-
视频融合云平台EasyCVR视频广场左侧栏列表样式优化
史上最全MongoDB之初识篇
Learn how to use js to merge two objects into one object assign()
未婚夫捐5亿美元给女PI,让她不用申请项目,招150位科学家,安心做科研!
AI landing new question type RPA + AI =?
Triple half circle progress bar, you can use it directly
Have you got the same "artifact" of cross architecture development praised by various industry leaders?
Restore backup data on GCS with br