[Gambas-devel] How to talk to "other" form?

Dan Phillips dan at ...21...
Tue May 6 22:06:30 CEST 2003


Ok, I've created a form:  "frmHome" and a form: "frmMods".
Now, hFrmHome is the instance of frmHome and hFrmMods is the instance of the 
2nd form.  hFrmHome has a button which opens the 2nd form.  On the 2nd form, 
there is a button which alters text in a textfield on the 1st form.  How do I 
make this happen?  I cannot seem to figure out how to alter something "not" 
on the current form in the code.  Ie. In VB I would add the following code to 
the command button "Command1" on form frmMods.  

Private Sub Command1_Click()
        frmHome.txtField1.text = "Altered Text Here"
End Sub

I don't need to write much more here as everyone I'm sure understands what I'm 
after.  In Gambas, I cannot seem to apply action to any form other than the 
current form which contains the code unless I pass the form an option when I 
initialize it.  Once it's initialized though, how do I communicate w/ objects 
on that other form?

-- 
-----------------------
-Thanks, Dan
-Haight & Associates, Inc.
-907.586.9788
-----------------------




More information about the Devel mailing list