Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

select all Textinput kivy on selection

Selection is cancelled when TextInput is focused. 
If you need to show selection when TextInput is focused, 
you should delay (use Clock.schedule) the call to the functions for selecting text 
(select_all, select_text).

#: import Clock kivy.clock.Clock

TextInput:
  text: "Prefix"
  on_focus: Clock.schedule_once(lambda dt: self.select_all()) if self.focus else None
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #select #Textinput #kivy #selection
ADD COMMENT
Topic
Name
7+2 =