Wish TextField1_FocusChanged(HasFocus As Boolean)

BPak

Active Member
Licensed User
Longtime User
Wish that the TextField had an event for Focus Changed.
 

LucaMs

Expert
Licensed User
Longtime User
It "has" that event.

Declare an EditText in the Globals section.

Then write:

Sub + Space + Tab + e (for edittext) + Tab again. This lists all avalaible events for EditText

P.S. You don't need to declare the EditText, the "procedure" works even without it
 

BPak

Active Member
Licensed User
Longtime User
It "has" that event.

Declare an EditText in the Globals section.

Then write:

Sub + Space + Tab + e (for edittext) + Tab again. This lists all avalaible events for EditText

P.S. You don't need to declare the EditText, the "procedure" works even without it

Does not show any TextField Focus Changed in the list.
See images
textfield1.png
textfield2.png
 

stevel05

Expert
Licensed User
Longtime User
Unfortunately that example is B4a as well.

It's a different process with B4j which uses change listeners which Andrew has exposed in his jReflection Library.

So on B4j it would be:

B4X:
    Dim R As Reflector
R.Target = TextField1
R.AddChangeListener("TextField1Focus","focusedProperty")
End Sub

Sub TextField1Focus_Changed(old As Object,New As Object)
    Log(New)
End Sub
 
Last edited:
Top