当前位置:网站首页>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
边栏推荐
- 见到小叶栀子
- leetcode 53. Maximum subarray maximum subarray sum (medium)
- 主设备号和次设备号均为0
- C#使用西门子S7 协议读写PLC DB块
- Digital chemical plant management system based on Virtual Simulation Technology
- Highly paid programmers & interview questions. Are you familiar with the redis cluster principle of series 120? How to ensure the high availability of redis (Part 1)?
- 测试/开发程序员怎么升职?从无到有,从薄变厚.......
- 接口自动化测试实践指导(中):接口测试场景有哪些
- Formation continue en robotique (automatisation) - 2022 -
- 【写给初发论文的人】撰写综述性科技论文常见问题
猜你喜欢
Video fusion cloud platform easycvr video Plaza left column list style optimization
【刷题记录】2. 两数相加
Collection of idea gradle Lombok errors
Antd comment recursive loop comment
Have you got the same "artifact" of cross architecture development praised by various industry leaders?
【写给初发论文的人】撰写综述性科技论文常见问题
[team learning] [34 issues] scratch (Level 2)
【自动化经验谈】自动化测试成长之路
AI landing new question type RPA + AI =?
机器人(自动化)课程的持续学习-2022-
随机推荐
buildroot的根文件系统提示“depmod:applt not found”
Digital chemical plant management system based on Virtual Simulation Technology
Redis source code learning (30), dictionary learning, dict.h
MySQL data loss, analyze binlog log file
软件测试之网站测试如何进行?测试小攻略走起!
各路行业大佬称赞的跨架构开发“神器”,你get同款了吗?
掌握软件安全测试方法秘笈,安全测试报告信手捏来
JetBrain Pycharm的一系列快捷键
Ssm+jsp realizes enterprise management system (OA management system source code + database + document +ppt)
POJ training plan 2253_ Frogger (shortest /floyd)
軟件測試之網站測試如何進行?測試小攻略走起!
未婚夫捐5亿美元给女PI,让她不用申请项目,招150位科学家,安心做科研!
AI landing new question type RPA + AI =?
AI 落地新题型 RPA + AI =?
Kotlin compose text supports two colors
What if the win11 screenshot key cannot be used? Solution to the failure of win11 screenshot key
Quick completion guide of manipulator (10): accessible workspace
CUDA Programming
C # use Siemens S7 protocol to read and write PLC DB block
Restore backup data on GCS with tidb lightning