some tests with kivy

This commit is contained in:
2020-09-14 22:50:27 +02:00
parent c05c456f31
commit cbb41e481e
4 changed files with 276 additions and 1 deletions

View File

@@ -0,0 +1,48 @@
ShowcaseScreen:
name: 'TextInputs'
focused: ti_default
on_parent:
if not args[1] and self.focused: self.focused.focus = False
if args[1]: ti_default.focus = True
CTextInput
size_hint_y: None
height: '32dp'
multiline: False
text: 'Monoline textinput'
CTextInput:
id: ti_default
size_hint_y: None
height: '32dp'
text: 'Focused textinput'
focus: True
CTextInput:
size_hint_y: None
height: '32dp'
text: 'Password'
password: True
CTextInput:
size_hint_y: None
height: '32dp'
text: 'Readonly textinput'
readonly: True
CTextInput:
size_hint_y: None
height: '48dp'
text: 'Multiline textinput\nSecond line'
multiline: True
CTextInput:
size_hint_y: None
height: '32dp'
disabled: True
text: 'Disabled textinput'
<CTextInput@TextInput>
on_focus:
screen = self.parent.parent.parent.parent
if screen.parent: screen.focused = self