BPak Active Member Licensed User Longtime User Jan 25, 2014 #1 Wish that the TextField had an event for Focus Changed.
LucaMs Expert Licensed User Longtime User Jan 25, 2014 #2 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
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 Jan 25, 2014 #3 LucaMs said: 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 Click to expand... Does not show any TextField Focus Changed in the list. See images
LucaMs said: 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 Click to expand... Does not show any TextField Focus Changed in the list. See images
LucaMs Expert Licensed User Longtime User Jan 25, 2014 #4 SORRY !!! I did not realize that it is a thread B4J. There is in B4A. I believe that there is a way, via Reflection. I guess (hope) that this library exits already in B4J.
SORRY !!! I did not realize that it is a thread B4J. There is in B4A. I believe that there is a way, via Reflection. I guess (hope) that this library exits already in B4J.
LucaMs Expert Licensed User Longtime User Jan 25, 2014 #5 I found this example (by Stevel05): Code: Copy Dim R As Reflector R.Target = EditText1 R.SetOnFocusListener("ETFocus") Sub ETFocus(ViewTag As Object,Focus As Boolean) Log(Focus) End Sub
I found this example (by Stevel05): Code: Copy Dim R As Reflector R.Target = EditText1 R.SetOnFocusListener("ETFocus") Sub ETFocus(ViewTag As Object,Focus As Boolean) Log(Focus) End Sub
stevel05 Expert Licensed User Longtime User Jan 26, 2014 #6 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: Code: Copy 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: Jan 26, 2014
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: Code: Copy 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
Erel B4X founder Staff member Licensed User Longtime User Jan 26, 2014 #7 This event will be added to all nodes in the next version.
LucaMs Expert Licensed User Longtime User Apr 9, 2014 #8 Rick Harris said: This is good example of where there is confusion between B4A and B4J. I still think it would be better to split this Forum in totally separate B4A and B4J sections. B4J is cluttering the B4A forum, at least that is still my opinion. Click to expand... No, it is the typical error of my distraction
Rick Harris said: This is good example of where there is confusion between B4A and B4J. I still think it would be better to split this Forum in totally separate B4A and B4J sections. B4J is cluttering the B4A forum, at least that is still my opinion. Click to expand... No, it is the typical error of my distraction