-
Notifications
You must be signed in to change notification settings - Fork 1
/
WidgetHelper.py
35 lines (31 loc) · 1017 Bytes
/
WidgetHelper.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
from kivy.uix.boxlayout import BoxLayout
from kivy.metrics import cm
from kivy.uix.textinput import TextInput
from MyLabel import MyLabel
from kivymd.uix.boxlayout import MDBoxLayout
from kivymd.uix.label import MDLabel
from kivymd.uix.textfield import MDTextField
#from kivymd.uix.textfield import MDTextField
class WidgetHelper:
def getDialogRow(self):
return MDBoxLayout(
orientation='horizontal',
adaptive_height = True
)
'''BoxLayout(
orientation="horizontal",
height=cm(1),
size_hint_y = None
)'''
def addDialogRow(self, bl, title, val):
#bh = self.getDialogRow()
#bh.add_widget(MDLabel(text="%s:"%title))
ti = MDTextField(
text=str(val),
)
ti.hint_text = "%s:"%title
bl.add_widget(ti)
#ti = MDTextField(text = str(val))
#bh.add_widget( ti )
#bl.add_widget( bh )
return bl,ti