python能够设置标签背景色的属性是( )_如何在Kivy中动态更改标签背景颜色

这个博客展示了如何设计和实现一个TodoList应用的用户界面。应用采用了垂直布局,包含Header部分,显示'TODOLIST'标题,并有一个返回按钮。主内容区域是一个ScrollView,内含一个添加任务的输入框和添加按钮。点击加号按钮会将新任务添加到列表中。每个任务项包括一个可编辑的任务描述标签和删除及标记为已完成的按钮。博客详细描述了界面元素的样式和交互功能。
摘要由CSDN通过智能技术生成

:

font_size: 15:

BoxLayout:

id: home

orientation: "vertical"

spacing: 5

#space_x: self.size[0]/2

canvas.before:

Color:

rgba: (1,1,1,1)

Rectangle:

size: self.size

pos: self.pos

##########HEADER#######

BoxLayout:

id: header

size_hint_y: None

height: 50

canvas.before:

Color:

rgba: (.85,.7,.2,1)

Rectangle:

size: self.size

pos: self.pos

Label:

text: "TO DO LIST"

font_size: "20sp"

bold: True

size_hint_x: .9

FlatButton:

text: "Back"

size_hint_x: .1

####################################

ScrollView:

canvas.before:

Color:

rgba: (1,1,.2,.2)

Rectangle:

size: self.size

pos: self.pos

BoxLayout:

id: add_field

size_hint_y: None

height: self.minimum_height

orientation: 'vertical'

spacing: 2 #Spaces between childs

#####################################################

BoxLayout:

id: input_field

size_hint_y: None

height: 80

TextInput:

id: task_input

focus: True

size_hint_x: .9

multiline: False

Button:

font_size: "40sp"

size_hint_x: .1

text: "+"

on_release: root.addWidget()

id: button1

color: 1,0.5,0.5,1

#######################################################:

size_hint_y: None

height: 50

id: each_task

BoxLayout:

Label:

size_hint_x: .8

id: label

canvas.before:

Color:

rgba: (1,.2,.2,.2)

Rectangle:

size: self.size

pos: self.pos

Button:

size_hint_x: .1

text: "X"

on_release: app.root.ids.add_field.remove_widget(root)

Button:

size_hint_x: .1

text: "DO IT"

on_release: root.Do_Task(self)

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值