Possible to 'click' on a textbox?

CARTHO

Member
Licensed User
Longtime User
Hello guys
Is there any way to 'click' on a textbox.
I need an event when the customer click on a textbox.
The button that is showing extra information available is to small depending on a lot of other things on the screen.
The textbox is relatively large and easy to reach (the application is in a car and because it is a little 'bumpy' when they drive around it is hard to 'click' on the button.)

I tried to put a large button instead of the textbox but it doesn't support CRLF so it made it impossible.
Does anyone have an idea?
 

dlfallen

Active Member
Licensed User
Longtime User
Yes, you can do it with the door library. Here is some sample code:

Sub Globals
'Declare the global variables here.
'Uses the Door library
'Add an object called obj
'Add an event called TB1Click
'Now, when you run this program the textbox detects a click and generates a message box.
End Sub

Sub App_Start
Form1.Show
AddTextBox("Form1","TextBox1",75,40,75,22,"Textbox")
obj.New1(
False)
obj.FromControl(
"TextBox1")
TB1Click.New1(Obj.Value,
"Click")
End Sub

Sub TB1Click_NewEvent
Msgbox("TextBox was clicked!")
End Sub
 

sitajony

Active Member
Licensed User
You can also do it otherwise:

B4X:
Sub TextBox1_GotFocus
    'Do AnyThing.
    'Change Focus on an other control for click again else it's still in focus...
End Sub

But Door is better...
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…