[Gambas-user] About forms
Richard
richard.j.walker at ...247...
Sun Mar 16 22:26:06 CET 2008
Le Sunday 16 March 2008 11:05:45 Kari Laine, vous avez écrit :
> Hi,
>
> I again have a problem with forms.
>
> I make three forms, FMain, form1, form2 and FMain is the startup form.
> there is a textbox in FMain and form1.
> There is button on FMain which shows form1. On the form1 there is a
> button which shows form2. On Form2 there is a button which sets
> textboxes on FMain and Form1. That button can change a textbox on Fmain
> but not on form1 - nothing happens for the textbox on form1. The button
> is able to change the textbox on FMain but not on Form1.
>
> Hopefully this is comprehensible.
>
> Best Regards
> Kari Laine
>
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2008.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
I have a suggested solution in the attached file. The basic idea is that since
form controls are not, by default, public we can write a class method to
update the text box for each form. This is public, so the button action on
Form2 can use these public methods.
Of course, you can also change the PUBLIC/PRIVATE setting for form controls in
your project. See the menu Project->Properties and look at the Options page.
Richard
-------------- next part --------------
A non-text attachment was scrubbed...
Name: FormTest-0.0.1.tar.gz
Type: application/x-tgz
Size: 7851 bytes
Desc: not available
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20080316/e883453d/attachment.bin>
More information about the User
mailing list