I was trying use max_height to limit the number of lines that the multiline=True MD TextField can expand to. In the KivyMD documentation for the TextField class (https://kivymd.readthedocs.io/en/latest/components/text-field/#module-kivymd.uix.textfield), there is sample code that is accompanied by a gif of what running it should look like, but when I copy/pasted it into a python file by itself to test it and ran it in PyCharm, the MDTextField didn't stop like it does in the gif or at all.
The example code given:
from kivy.lang import Builder
from kivymd.app import MDApp
KV = '''
MDScreen
MDTextField:
size_hint_x: .5
hint_text: "multiline=True"
max_height: "200dp"
mode: "fill"
fill_color: 0, 0, 0, .4
multiline: True
pos_hint: {"center_x": .5, "center_y": .5}
'''
class Example(MDApp):
def build(self):
return Builder.load_string(KV)
Example().run()
Is this some kind of bug or is there something I can do about it? I'm trying to implement this in my project, but not even the example code is working for me.