当前位置:网站首页>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
边栏推荐
- [written to the person who first published the paper] common problems in writing comprehensive scientific and Technological Papers
- 数学分析_笔记_第10章:含参变量积分
- SSM+jsp实现仓库管理系统,界面那叫一个优雅
- This "advanced" technology design 15 years ago makes CPU shine in AI reasoning
- 史上最全MongoDB之Mongo Shell使用
- NanopiNEO使用开发过程记录
- The first introduction of the most complete mongodb in history
- 2022中青杯C题城市交通思路分析
- [multi threading exercise] write a multi threading example of the producer consumer model.
- 见到小叶栀子
猜你喜欢
接口自动化测试实践指导(中):接口测试场景有哪些
Win11玩绝地求生(PUBG)崩溃怎么办?Win11玩绝地求生崩溃解决方法
Imitate Tengu eating the moon with Avatar
各路行业大佬称赞的跨架构开发“神器”,你get同款了吗?
Food Chem|深度学习根据成分声明准确预测食品类别和营养成分
The root file system of buildreoot prompts "depmod:applt not found"
The request request is encapsulated in uni app, which is easy to understand
C#使用西门子S7 协议读写PLC DB块
[coded font series] opendyslexic font
The most complete security certification of mongodb in history
随机推荐
Ssm+jsp realizes enterprise management system (OA management system source code + database + document +ppt)
科兴与香港大学临床试验中心研究团队和香港港怡医院合作,在中国香港启动奥密克戎特异性灭活疫苗加强剂临床试验
On the 110th anniversary of Turing's birth, has the prediction of intelligent machine come true?
leetcode 53. Maximum subarray maximum subarray sum (medium)
Kotlin compose text supports two colors
[team learning] [phase 34] Baidu PaddlePaddle AI talent Creation Camp
这项15年前的「超前」技术设计,让CPU在AI推理中大放光彩
Redis source code learning (31), dictionary learning, dict.c (1)
Five years of automated testing, and finally into the ByteDance, the annual salary of 30W is not out of reach
軟件測試之網站測試如何進行?測試小攻略走起!
NTU notes 6422quiz review (1-3 sections)
Unit test asp Net MVC 4 Application - unit testing asp Net MVC 4 apps thoroughly
中青杯2022A题高校数学建模竞赛与课程教育思路分析
SSM+jsp实现仓库管理系统,界面那叫一个优雅
Kotlin Compose Text支持两种颜色
Comment les tests de logiciels sont - ils effectués sur le site Web? Testez la stratégie!
MySQL null value processing and value replacement
案例大赏:英特尔携众多合作伙伴推动多领域AI产业创新发展
Practice Guide for interface automation testing (middle): what are the interface testing scenarios
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