我正在開發一個簡單的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]