NikB4x Member Licensed User Longtime User May 2, 2019 #1 Is it possible (in B4J) to set the focus on the first field of the form at start? Thanks,
Erel B4X founder Staff member Licensed User Longtime User May 2, 2019 #2 The exact details depend on your form's layout. Example of setting the focus on the 6th item which is an item made of a B4XFloatTextField. Code: Copy Dim sf As Object = p.ShowDialog(CreateMap(), "OK", "CANCEL") Sleep(0) Dim tf As B4XFloatTextField = p.CustomListView1.GetPanel(5).GetView(0).Tag tf.TextField.RequestFocus Wait For (sf) Complete (Result As Int) Upvote 0
The exact details depend on your form's layout. Example of setting the focus on the 6th item which is an item made of a B4XFloatTextField. Code: Copy Dim sf As Object = p.ShowDialog(CreateMap(), "OK", "CANCEL") Sleep(0) Dim tf As B4XFloatTextField = p.CustomListView1.GetPanel(5).GetView(0).Tag tf.TextField.RequestFocus Wait For (sf) Complete (Result As Int)
NikB4x Member Licensed User Longtime User May 2, 2019 #3 Thank you very much Erel. It works like a charm! Upvote 0