当前位置:网站首页>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
边栏推荐
- SSM+JSP实现企业管理系统(OA管理系统源码+数据库+文档+PPT)
- How do test / development programmers get promoted? From nothing, from thin to thick
- True global ventures' newly established $146million follow-up fund was closed, of which the general partner subscribed $62million to invest in Web3 winners in the later stage
- ACL2022 | 分解的元学习小样本命名实体识别
- Mathematical analysis_ Notes_ Chapter 10: integral with parameters
- UltraEdit-32 warm prompt: right association, cancel bak file [easy to understand]
- 机器人(自动化)课程的持续学习-2022-
- [record of question brushing] 2 Add two numbers
- Both primary and secondary equipment numbers are 0
- buildroot的根文件系统提示“depmod:applt not found”
猜你喜欢
【ArcGIS教程】专题图制作-人口密度分布图——人口密度分析
2022年电工杯B 题 5G 网络环境下应急物资配送问题思路分析
On the 110th anniversary of Turing's birth, has the prediction of intelligent machine come true?
Ssm+jsp realizes the warehouse management system, and the interface is called an elegant interface
这项15年前的「超前」技术设计,让CPU在AI推理中大放光彩
Mathematical analysis_ Notes_ Chapter 10: integral with parameters
[team learning] [34 sessions] Alibaba cloud Tianchi online programming training camp
This "advanced" technology design 15 years ago makes CPU shine in AI reasoning
Intel David tuhy: the reason for the success of Intel aoten Technology
图灵诞辰110周年,智能机器预言成真了吗?
随机推荐
VIM - own active button indent this command "suggestions collection"
Use facet to record operation log
Mathematical analysis_ Notes_ Chapter 10: integral with parameters
NanopiNEO使用开发过程记录
用头像模仿天狗食月
数学分析_笔记_第10章:含参变量积分
软件测试之网站测试如何进行?测试小攻略走起!
视频融合云平台EasyCVR视频广场左侧栏列表样式优化
In cooperation with the research team of the clinical trial center of the University of Hong Kong and Hong Kong Gangyi hospital, Kexing launched the clinical trial of Omicron specific inactivated vacc
测试/开发程序员怎么升职?从无到有,从薄变厚.......
掌握软件安全测试方法秘笈,安全测试报告信手捏来
科兴与香港大学临床试验中心研究团队和香港港怡医院合作,在中国香港启动奥密克戎特异性灭活疫苗加强剂临床试验
The easycvr platform is connected to the RTMP protocol, and the interface call prompts how to solve the error of obtaining video recording?
JetBrain Pycharm的一系列快捷键
见到小叶栀子
ESG全球领导者峰会|英特尔王锐:以科技之力应对全球气候挑战
EasyCVR平台接入RTMP协议,接口调用提示获取录像错误该如何解决?
leetcode 53. Maximum subarray maximum subarray sum (medium)
C # use Siemens S7 protocol to read and write PLC DB block
VM virtual machine operating system not found and NTLDR is missing