D Declan Well-Known Member Licensed User Longtime User Apr 25, 2023 #1 How can I clear an EditText in a B4XPage from Main? I have an EditText "txtUsername" in B4XPage "pgRegister" I then need to clear the text from Main. I have tried the following: B4X: Copy B4XPages.pgRegister.txtUsername.text = "" and B4XPages.pgRegister.txtUsername.nativeobject.Text = ""
How can I clear an EditText in a B4XPage from Main? I have an EditText "txtUsername" in B4XPage "pgRegister" I then need to clear the text from Main. I have tried the following: B4X: Copy B4XPages.pgRegister.txtUsername.text = "" and B4XPages.pgRegister.txtUsername.nativeobject.Text = ""
Solution D D Declan Apr 25, 2023 Sorted: B4X: Copy B4XPages.GetManager.MainPage.pgx2.txtUsername.RequestFocus
Alexander Stolte Expert Licensed User Longtime User Apr 25, 2023 #2 Declan said: B4XPages.pgRegister.txtUsername.text = "" Click to expand... B4X: Copy B4XPages.GetManager.MainPage.p_Page2.txtUsername.Text = "" Set the Page you want in the B4XMainPage to public: B4X: Copy Public p_Page2 As b4xp_Page2 now you can access it. Upvote 1
Declan said: B4XPages.pgRegister.txtUsername.text = "" Click to expand... B4X: Copy B4XPages.GetManager.MainPage.p_Page2.txtUsername.Text = "" Set the Page you want in the B4XMainPage to public: B4X: Copy Public p_Page2 As b4xp_Page2 now you can access it.
D Declan Well-Known Member Licensed User Longtime User Apr 25, 2023 #3 Alexander Stolte said: Set the Page you want in the B4XMainPage to public: Click to expand... I have done that: B4X: Copy Public pgx2 As pgRegister Upvote 0
Alexander Stolte said: Set the Page you want in the B4XMainPage to public: Click to expand... I have done that: B4X: Copy Public pgx2 As pgRegister
D Declan Well-Known Member Licensed User Longtime User Apr 25, 2023 #4 Declan said: I have done that: B4X: Copy Public pgx2 As pgRegister Click to expand... This works: B4X: Copy B4XPages.GetManager.MainPage.pgx2.txtUsername.Text = "" How do I set focus to txtUsername? Upvote 0
Declan said: I have done that: B4X: Copy Public pgx2 As pgRegister Click to expand... This works: B4X: Copy B4XPages.GetManager.MainPage.pgx2.txtUsername.Text = "" How do I set focus to txtUsername?
D Declan Well-Known Member Licensed User Longtime User Apr 25, 2023 #5 Sorted: B4X: Copy B4XPages.GetManager.MainPage.pgx2.txtUsername.RequestFocus Upvote 0 Solution