当前位置:网站首页>Change the background color of Kivy tutorial (tutorial includes source code)
Change the background color of Kivy tutorial (tutorial includes source code)
2022-07-04 04:36:00 【Knowledge fatness】
We will adjust the window background color . Window background (OpenGL Of the renderer “ Clear color ”) It's the whole picture Window Object properties . To change it , We are below __name__ == 'main’ Add this code after line main.py:
from kivy.core.window import Window
from kivy.utils import get_color_from_hex
Window.clearcolor = get_color_from_hex('#101216')
Combat code

import kivy
from kivy.app import App
from kivy.lang import Builder
from kivy.core.window import Window
from kivy.utils import get_color_from_hex
#Window.clearcolor = [1, 1, 1, 1]
Window.clearcolor = get_color_from_hex("#ffffff")
kvcode = """
#:import C kivy.utils.get_color_from_hex
<[email protected]>:
size_hint: .2, .3
canvas.before:
Color:
rgba: C("#22FFAA")
Rectangle:
pos: self.pos
size: self.size
FloatLayout:
FVerde:
pos_hint:{"x":.4, "y":.4}
"""
class JanelaApp(App):
def build(self):
return Builder.load_string(kvcode)
janela = JanelaApp()
janela.run()
边栏推荐
- Rhcsa 01 - create partitions and file systems
- C language bidirectional linked list first edition
- 什么是上下文?
- Select function variable column name in dplyr of R language
- 旭化成首次参展第五届中国国际进口博览会(5th CIIE)
- Asynchronous development process - touch your hand and lead you to realize a promise
- UnicodeDecodeError: ‘gbk‘ codec can‘t decode byte 0x98 in position 1093: illegal multibyte sequence
- 陪驾注意事项 这23点要注意!
- Dp83848+ network cable hot plug
- Formatted text of Kivy tutorial (tutorial includes source code)
猜你喜欢

架构实战营 - 第 6 期 模块九之毕业设计

Keysight N9320B射频频谱分析仪解决轮胎压力监测方案

I.MX6U-ALPHA开发板(C语言版本LED驱动实验)

Architecture training graduation design + summary

Formatted text of Kivy tutorial (tutorial includes source code)

Architecture practice camp - graduation project of module 9 of phase 6

EventBridge 在 SaaS 企业集成领域的探索与实践
![[cloud native] those lines of code that look awesome but have a very simple principle](/img/6d/220c51a643263f431fb57c97c4b8ff.png)
[cloud native] those lines of code that look awesome but have a very simple principle

MySQL 索引和事务

Longest increasing subsequence problem (do you really know it)
随机推荐
1. Mx6u-alpha development board (LED drive experiment in C language version)
MySQL 索引和事务
I.MX6U-ALPHA开发板(C语言版本LED驱动实验)
浅谈一篇优质的小红书文案需要具备什么
Architecture practice camp - graduation project of module 9 of phase 6
Rhcsa 03 - Basic permissions for documents
(pointer) write a function to compare the size of strings by yourself, which is similar to StrCmp.
Instructions for LPC interrupt binding under ft2000+
A beautiful API document generation tool
“找工作不要太在意工资”,这是我听过最大的谎言
2021 RSC | Drug–target affinity prediction using graph neural network and contact maps
leetcode 121 Best Time to Buy and Sell Stock 买卖股票的最佳时机(简单)
统计遗传学:第三章,群体遗传
分布式CAP理论
The "functional art" jointly created by Bolang and Virgil abloh in 2021 to commemorate the 100th anniversary of Bolang brand will debut during the exhibition of abloh's works in the museum
Many founders of technology companies provided enterpriser first with a round C financing of up to US $158million to help it invest in the next generation of global innovators
Intersection traffic priority, illustration of intersection traffic rules
NFT新的契机,多媒体NFT聚合平台OKALEIDO即将上线
[wechat applet] good looking carousel map component
Operation of ES6