Forum Archive

UI.TextView.action

mal

Can't understand how to create/delegate action method for ui.TextView (like ui.TextFiled.action that gets called when text field has finished editing).

Is it possible?

ccc

@mal, Check out https://github.com/cclauss/Pythonista_ui/blob/master/GetSomeTextView.py

mal

Thanks for the answer, only what I want:

to start func TextArea_tapped() after any action in TextView

def TextArea_tapped(sender):
  if len(textarea.text) > 0:
    a_button.enabled = True
  else:
    a_button.enabled = False
ccc
def TextArea_tapped(sender):
  sender.superview['a_button'].enabled = sender.text != ""

See: http://omz-forums.appspot.com/pythonista/post/4995445122138112

And: https://github.com/humberry/ui-tutorial