当前位置:网站首页>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
边栏推荐
- 两个div在同一行,两个div不换行「建议收藏」
- 接口自动化测试实践指导(中):接口测试场景有哪些
- 视频融合云平台EasyCVR视频广场左侧栏列表样式优化
- On the 110th anniversary of Turing's birth, has the prediction of intelligent machine come true?
- 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
- Intel and Xinbu technology jointly build a machine vision development kit to jointly promote the transformation of industrial intelligence
- Unity3d can change colors and display samples in a building GL material
- Unit test asp Net MVC 4 Application - unit testing asp Net MVC 4 apps thoroughly
- SSM+jsp实现仓库管理系统,界面那叫一个优雅
- Pyqt5 out of focus monitoring no operation timer
猜你喜欢
【写给初发论文的人】撰写综述性科技论文常见问题
Easycvr cannot be played using webrtc. How to solve it?
[OA] excel document generator: openpyxl module
【自动化经验谈】自动化测试成长之路
Intel and Xinbu technology jointly build a machine vision development kit to jointly promote the transformation of industrial intelligence
史上最全MongoDB之安全认证
This "advanced" technology design 15 years ago makes CPU shine in AI reasoning
Mathematical analysis_ Notes_ Chapter 10: integral with parameters
EasyCVR平台接入RTMP协议,接口调用提示获取录像错误该如何解决?
Win11远程桌面连接怎么打开?Win11远程桌面连接的五种方法
随机推荐
ESG Global Leaders Summit | Intel Wang Rui: coping with global climate challenges with the power of science and technology
Mathematical analysis_ Notes_ Chapter 10: integral with parameters
What if the win11 screenshot key cannot be used? Solution to the failure of win11 screenshot key
[team learning] [34 issues] scratch (Level 2)
Ssm+jsp realizes enterprise management system (OA management system source code + database + document +ppt)
EasyCVR无法使用WebRTC进行播放,该如何解决?
Have you got the same "artifact" of cross architecture development praised by various industry leaders?
Easycvr cannot be played using webrtc. How to solve it?
[untitled]
VM virtual machine operating system not found and NTLDR is missing
史上最全MongoDB之部署篇
Mongo shell, the most complete mongodb in history
MySQL split method usage
Comment les tests de logiciels sont - ils effectués sur le site Web? Testez la stratégie!
Intel David tuhy: the reason for the success of Intel aoten Technology
VIM - own active button indent this command "suggestions collection"
C # use Siemens S7 protocol to read and write PLC DB block
Digital chemical plants realize the coexistence of advantages of high quality, low cost and fast efficiency
Optimization of channel status offline of other server devices caused by easycvr cluster restart
EasyCVR集群版本添加RTSP设备提示服务器ID错误,该如何解决?