当前位置:网站首页>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()
边栏推荐
- 深入解析结构化异常处理(SEH) - by Matt Pietrek
- NFT new opportunity, multimedia NFT aggregation platform okaleido will be launched soon
- What does software testing do? Find defects and improve the quality of software
- Krypton saikr daily question - CTF
- 什么是上下文?
- Intersection traffic priority, illustration of intersection traffic rules
- Kivy教程之 格式化文本 (教程含源码)
- Rhcsa 03 - Basic permissions for documents
- Redis: order collection Zset type data operation command
- [microservice openfeign] @feignclient detailed explanation
猜你喜欢

Dp83848+ network cable hot plug

GUI 应用:socket 网络聊天室

Keysight n9320b RF spectrum analyzer solves tire pressure monitoring scheme

A beautiful API document generation tool

FT2000+下LPC中断绑核使用说明

Deep parsing structured exception handling (SEH) - by Matt Pietrek

普源DS1000Z系列数字示波器在通信原理实验中的应用方案

96% of the collected traffic is prevented by bubble mart of cloud hosting

Redis:有序集合zset类型数据操作命令

Modstartblog modern personal blog system v5.2.0 source code download
随机推荐
Formatted text of Kivy tutorial (tutorial includes source code)
leetcode:1314. Matrix area and [2D prefix and template]
NFT新的契机,多媒体NFT聚合平台OKALEIDO即将上线
Rhcsa 06 - suid, sgid, sticky bit (to be added)
一个漂亮的API文档生成工具
Select function variable column name in dplyr of R language
MIN_ RTO dialog
GUI 应用:socket 网络聊天室
1. Mx6u-alpha development board (LED drive experiment in C language version)
深入解析结构化异常处理(SEH) - by Matt Pietrek
【愚公系列】2022年7月 Go教学课程 001-Go语言前提简介
Redis:集合Set类型数据的操作命令
EIG在智利推出可再生能源平台Grupo Cerro
1. Mx6u-alpha development board (simulating STM32 drive development experiment)
微信脑力比拼答题小程序_支持流量主带最新题库文件
Asahi Kasei participated in the 5th China International Import Expo (5th ciie) for the first time
Unity Resource path
陪驾注意事项 这23点要注意!
RHCSA 08 - automount配置
96% of the collected traffic is prevented by bubble mart of cloud hosting