from kivymd.app import MDApp
from kivymd.uix.boxlayout import BoxLayout
from kivymd.uix.textfield import MDTextField
class Mywidget(BoxLayout):
pass
class Myapp(MdApp):
def build(self):
return Mywidget()
Myapp().run()
Kv文件:->;myapp.kv
<Mywidget>
orientation:"horizontal"
MDTextField:
halign:"center"
valign:"center"
hint_text:"Enter your name"
foreground_color:1,1,0,1
但textfield的前景色并没有改变。我怎样才能改变它。我在互联网上查看了它的解决方案,但什么也没发生
https://kivymd.readthedocs.io/en/latest/components/text-field/index.html#color-mode
相关问题 更多 >
编程相关推荐