[Gambas-user] need help : form control (another one)
Pablo Vera
pvera at ...729...
Thu Dec 16 15:08:46 CET 2004
You could add a PUBLIC FUNCTION to fmOne that returns the number of
textboxes. For this to work, you need to use the TAG property of each
control to identify it. Every time you create a Textbox, you need to
assign the string "textbox" to its TAG property.
In fmOne:
PUBLIC FUNCTION CountTextboxes() AS Integer
DIM ctl AS Control
DIM Count AS Integer
Count = 0
FOR EACH ctl IN ME.Children
IF ctl.TAG = "textbox" THEN Count = Count + 1
NEXT
RETURN Count
END
In fmMain:
PUBLIC SUB btnGo_Click()
txtCount.Text = fmOne.CountTextboxes
END
I hope this helps.
Saludos,
Pablo Vera
Iggy Budiman wrote:
>Hi all,
>I have another question about form controls.
>
>2 forms (fmMain and fmOne)
>fmMain has 1 textbox (txtCount) and 1 button (btnGo)
>fmOne has many controls, several labels, buttons and textboxes.
>
>What I want to do is :
>When I click btnGo @fmMain, txtCount @fmMain display the number of textboxes
>at fmOne
>
>Thanks b4
>
>little info for Benoit : In my country, Gambas is local vegetable (cucumber
>family)
>When I talk to people about your Gambas, everybody always listened with big
>smile.
>
>
>
>
>-------------------------------------------------------
>SF email is sponsored by - The IT Product Guide
>Read honest & candid reviews on hundreds of IT Products from real users.
>Discover which products truly live up to the hype. Start reading now.
>http://productguide.itmanagersjournal.com/
>_______________________________________________
>Gambas-user mailing list
>Gambas-user at lists.sourceforge.net
>https://lists.sourceforge.net/lists/listinfo/gambas-user
>
>
>
>
>
>
--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.296 / Virus Database: 265.5.4 - Release Date: 12/15/04
More information about the User
mailing list