How To Focus To A Textbox

jothis

Active Member
Licensed User
hi
How To Focus To A textbox?

Please See The Attachment

When I Execute My Program It Is Focusing on the First Textbox. I have A Button named Next Page in first form when i click this button It Also Focusing The First textfiel in the second form. I Have A Button In Second Form Named Previous Page When I Click this button It is showing the First Form But It Is Not Focusing To Textbox.
Can You Tell Me How To Focus to A Textbox?
jothis
:sign0085:
 

Attachments

  • New Thread.zip
    512 bytes · Views: 320

klaus

Expert
Licensed User
Longtime User
With TextBox1.Focus.
B4X:
[FONT=Courier New][SIZE=2][COLOR=#0000ff][FONT=Courier New][SIZE=2][COLOR=#0000ff]
[SIZE=2][FONT=Courier New][COLOR=#0000ff]Sub [/COLOR][/FONT][/SIZE][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2][FONT=Courier New][SIZE=2]Nextpage_Click[/SIZE][/FONT]
[SIZE=2][FONT=Courier New]newform2.Show[/FONT][/SIZE]
[SIZE=2][FONT=Courier New]text1_1.Focus[/FONT][/SIZE]
[/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#0000ff][FONT=Courier New][SIZE=2][COLOR=#0000ff][FONT=Courier New][SIZE=2][COLOR=#0000ff]End Sub[/COLOR][/SIZE][/FONT]
 
[SIZE=2][FONT=Courier New][COLOR=#0000ff]Sub [/COLOR][/FONT][/SIZE][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2][FONT=Courier New][SIZE=2]prevpage_Click[/SIZE][/FONT]
[SIZE=2][FONT=Courier New]newform2.close[/FONT][/SIZE]
[SIZE=2][FONT=Courier New]newform.Show[/FONT][/SIZE]
[SIZE=2][FONT=Courier New]text1.Focus[/FONT][/SIZE]
[/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#0000ff][FONT=Courier New][SIZE=2][COLOR=#0000ff][FONT=Courier New][SIZE=2][COLOR=#0000ff]End Sub[/COLOR][/SIZE][/FONT]
[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT]

Best regards.
 
Top