test-kivy-app/kivy_venv/share/kivy-examples/demo/showcase/data/screens/textinputs.kv

49 lines
1.1 KiB
Plaintext
Raw Normal View History

2024-09-15 12:12:16 +00:00
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