当前位置:网站首页>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
边栏推荐
- [on automation experience] the growth path of automated testing
- Case reward: Intel brings many partners to promote the innovation and development of multi domain AI industry
- SQL where multiple field filtering
- The root file system of buildreoot prompts "depmod:applt not found"
- 軟件測試之網站測試如何進行?測試小攻略走起!
- [team learning] [34 issues] scratch (Level 2)
- 主设备号和次设备号均为0
- Fix the problem that the highlight effect of the main menu disappears when the easycvr Video Square is clicked and played
- 过气光刻机也不能卖给中国!美国无理施压荷兰ASML,国产芯片再遭打压
- Analysis on the thinking of college mathematical modeling competition and curriculum education of the 2022a question of the China Youth Cup
猜你喜欢
[system management] clear the icon cache of deleted programs in the taskbar
SSM+JSP实现企业管理系统(OA管理系统源码+数据库+文档+PPT)
SSM+jsp实现仓库管理系统,界面那叫一个优雅
【ArcGIS教程】专题图制作-人口密度分布图——人口密度分析
Win11远程桌面连接怎么打开?Win11远程桌面连接的五种方法
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
机器人(自动化)课程的持续学习-2022-
超越Postman,新一代国产调试工具Apifox,用起来够优雅
Easycvr cannot be played using webrtc. How to solve it?
2022 electrician cup question B analysis of emergency materials distribution under 5g network environment
随机推荐
Master the secrets of software security testing methods, and pinch the security test report with your hands
别样肉客联手德克士在全国部分门店推出别样汉堡
Deeply cultivate the developer ecosystem, accelerate the innovation and development of AI industry, and Intel brings many partners together
一度辍学的数学差生,获得今年菲尔兹奖
ESG Global Leaders Summit | Intel Wang Rui: coping with global climate challenges with the power of science and technology
Continuous learning of Robotics (Automation) - 2022-
sscanf,sscanf_s及其相关使用方法「建议收藏」
Network Security Learning - Information Collection
Optimization of channel status offline of other server devices caused by easycvr cluster restart
[team learning] [34 issues] scratch (Level 2)
Unity3d can change colors and display samples in a building GL material
Digital chemical plants realize the coexistence of advantages of high quality, low cost and fast efficiency
Use dumping to back up tidb cluster data to GCS
硬件开发笔记(十): 硬件开发基本流程,制作一个USB转RS232的模块(九):创建CH340G/MAX232封装库sop-16并关联原理图元器件
How to conduct website testing of software testing? Test strategy let's go!
The most complete deployment of mongodb in history
EasyCVR平台接入RTMP协议,接口调用提示获取录像错误该如何解决?
Triple half circle progress bar, you can use it directly
leetcode 53. Maximum Subarray 最大子数组和(中等)
mpf2_线性规划_CAPM_sharpe_Arbitrage Pricin_Inversion Gauss Jordan_Statsmodel_Pulp_pLU_Cholesky_QR_Jacobi