Gianni Sassanelli Active Member Licensed User Longtime User Sep 21, 2023 #1 Ciao a tutti, ho un panel che contiene più edittext che hanno lo stesso evento denominato TXT vorrei ottenere che quando le edittext hanno fuoco venga selezionato tutto il testo Purtroppo però funziona solo sulla prima Edittext [CODE lang="b4x" title="code"] Sub txt_FocusChanged (HasFocus As Boolean) Dim T As EditText T = Sender If HasFocus Then T.SelectionStart = 0 T.SelectAll end if End Sub [/CODE]
Ciao a tutti, ho un panel che contiene più edittext che hanno lo stesso evento denominato TXT vorrei ottenere che quando le edittext hanno fuoco venga selezionato tutto il testo Purtroppo però funziona solo sulla prima Edittext [CODE lang="b4x" title="code"] Sub txt_FocusChanged (HasFocus As Boolean) Dim T As EditText T = Sender If HasFocus Then T.SelectionStart = 0 T.SelectAll end if End Sub [/CODE]
Star-Dust Expert Licensed User Longtime User Sep 21, 2023 #2 Ciao Gianni, a me funziona correttamente. Vedi l'esempio Attachments MultiEvent.zip MultiEvent.zip 9.1 KB · Views: 402
Gianni Sassanelli Active Member Licensed User Longtime User Sep 22, 2023 #3 funziona funziona purtroppo l'evento aveva un I (i) invece di una L Grazxie