我正在开发一个简单的Notes应用程序。这就是我现在添加Note的屏幕的样子。 kivy TextInput更改字体颜色添加背景线
我想实现两件事情:
1.更改我的TextInput的字体颜色为白色。
2.添加命令行来我的TextInput所看到的画面
该行应始终即使将TextInput是空可见。从我的Python脚本
提取:(!谢谢)从我的KV文件
class NewNoteView(ModalView):
pass
提取
<NewNoteView>:
BoxLayout:
orientation: 'vertical'
BoxLayout:
size_hint_y: 0.2
canvas.before:
Color:
rgb: 33/255, 41/255, 55/255
Rectangle:
pos: self.pos
size: self.size
orientation: 'vertical'
BoxLayout:
Button:
size_hint_x:0.1
text: 'x'
font_size: self.height*0.5
background_color: 0, 0, 0, 0
on_press: root.dismiss()
Label:
text: 'New Label'
Button:
size_hint_x:0.1
text:'+'
font_size: self.height*0.5
background_color: 0, 0, 0, 0
on_press: app.root.notifyP()
Button:
size_hint_x:0.1
text: 'L'
font_size: self.height*0.5
background_color: 0, 0, 0, 0
BoxLayout:
TextInput:
font_size: self.height*0.5
background_color: 0, 0, 0, 0
cursor_color: 1, 1, 1, 1
hint_text: 'Heading'
multiline: False
padding_x: [30,30]
Button:
size_hint_x: 0.2
BoxLayout:
canvas.before:
Color:
rgba: [38/255, 49/255, 70/255,1]
Rectangle:
pos: self.pos
size: self.size
TextInput:
background_color: 0, 0, 0, 0
cursor_color: 1, 1, 1, 1
color: 1, 1, 1, 1
hint_text: 'Body'
padding_x: [30,30]