[Gambas-user] Public Form Controls

Gianluigi gradobag at gradobag.it
Sun Jul 23 23:08:04 CEST 2023

Il 23/07/23 21:56, Demosthenes Koptsis ha scritto:
> ok i understood the example you gave....
> something else now but relative to subject...
> Which programming approach is better... Public Form Controls OR Not 
> Public...
> As new programmer i feel more easier the Public Form Controls.
> The example you gave increase complexity...

There is an equally simple way without making the controls public, write 
this code in the form with the textbox you want to make accessible to 
other forms:

Public Sub PrintTextBox(sText As String)

   If sText Then TextBox1.Text = sText


In the other forms just write the name of the form+dot+PrintTextBox('The 
text you want')



More information about the User mailing list