Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Control Source in Sub Forms
Message
De
18/06/2002 14:26:19
Irv Adams
MSC Managed Care, Inc.
Floride, États-Unis
 
 
À
18/06/2002 13:36:33
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00669831
Message ID:
00669847
Vues:
11
Darren:

Can you delay the instantiation of the Textbox on the small (popup) Form until after the INIT, since then you will know the Controlsource. So a plain Form will be created, then you can AddObject("TextBox") as follows:
oPopupForm.Init()
Parameters oControlSource

THIS.AddObject("MytextBox","TextBox")
MyTextBox.ControlSource = oControlsource
MytextBox.Visible=.T.
...or somthing along those lines, HTH,

-Irv.


>I am having a big problem trying to figure out the best way of passing variable references to sub forms for the control sources of text boxes etc. For example, I have a container class setup for a grid that includes add, edit and delete buttons. When the user clicks add, another small form class pops up on top of the grid with the related fields contained in it. We are using sql server with an ado connection, so the control source must be something like oobject.customer.customer_nme. But I can't use a public variable like oobject as the control source as multiple sub forms can be open at once and they would conflict with each other. So I have been trying to pass an object reference to the form but this goes to the Init method which fires after all of the text boxes do so it is too late. It would be nice to be able to pass it to the load event but I don't think that's possible? The control source could then be thisform.oobject.customer.name. Any suggestions?
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform