On this post I will show you how to get value from a text box in Gambas 3. Before we go through this tutorial, you may want to have a look at how to install Gambas 3 on Linux. Also, make sure you have created a new project on Gambas 3. This simple Gambas program will display the value in a Textbox control in a message box. In advance, you may use the value from the text box for other purposes in the program.
Lets get started
Create a new project and then add a new textbox and a button to the main form.
Now its coding time! On the example, I rename the Button1 to Click Me. You can change it to anything you want. Go to Text properties and type the new text for the button. Double click the button to enter the code.
Now type the following code :
Public Sub Button1_Click()
Now run the program and type some text to the textbox and then click the button. It should display the text we typed in the text box.