TextField onFocus or onClick

Hi,

i want to select the text within a textfield if it gets focus or i use clicks inside the field.
Are there any functions to handle that? E.g.:

  1. OnClick-Listener or OnFocus-Listener
  2. SelectText function

I tried to find a solution using google and this forum, but can’t find any results.

Thx a lot.