MDTextField missing HelperText
ikus060 opened this issue · comments
Patrik Dufresne commented
Description of the Bug
When creating MDTextField on the fly. The HelperText is not displayed.
Code and Logs
from kivy.clock import Clock
from kivy.lang import Builder
from kivymd.app import MDApp
from kivymd.uix.boxlayout import MDBoxLayout
KV = """
MDScreen:
md_bg_color: self.theme_cls.backgroundColor
MDBoxLayout:
id: wrapper
Component:
MDBoxLayout:
MDButton:
on_release: app.add()
MDButtonText:
text: "Add"
<Component>:
MDTextField:
id: field
pos_hint: {"center_x": .5, "center_y": .5}
text: "Text"
size_hint_x: .6
name: "Hint text"
MDTextFieldHelperText:
text: "Helper text"
mode: "persistent"
"""
class Component(MDBoxLayout):
pass
class TestHelperTextModePersistent(MDApp):
def build(self):
return Builder.load_string(KV)
def add(self):
subview = Component()
self.root.ids.wrapper.add_widget(subview)
TestHelperTextModePersistent().run()
Screenshots
Initial MDTextField has a helpertext.
But when adding new widget, the new one doesn't have helper text.
Versions
- OS: Linux
- Python: v3.10.12
- Kivy: v2.3.0
- KivyMD: 2.0.1.dev0, git-4e9fdba, 2024-03-25
Yuri Ivanov commented
Patrik Dufresne commented
Thanks ! I will test it soon