Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Why is a grid added to a form automatically bound to a table
Message
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Titre:
Why is a grid added to a form automatically bound to a table
Divers
Thread ID:
00364907
Message ID:
00364907
Vues:
49
How does a grid when .Add-ed to a form get bound automatically to an open table? Here's my code
CLOSE ALL  && Close tables and databases
OPEN DATABASE (HOME(2) + 'Data\testdata')
USE customer IN 0
frmMyForm = CREATEOBJECT('Form')
WITH frmMyForm
	.AddObject('grdGrid1','Grid')  && me:  bound
		.grdGrid1.Left = 25
		.grdGrid1.Visible = .T.
	.AddObject('cmdCommand1','cmdMyCmdBtn')
		.cmdCommand1.Left = 125
		.cmdCommand1.Top = 210
		.cmdCommand1.Visible =.T.
	.AddObject("txtText1",'Textbox')  && me: not bound
		.txtText1.Left = 125
		.txtText1.Top = 240
		.txtText1.Visible = .T.
	.Closable = .F.  && Disable the window pop-up menu
	.SHOW
ENDWITH
READ EVENTS

DEFINE CLASS cmdMyCmdBtn AS CommandButton
	Caption = '\<Quit'
	Cancel = .T.
	Height = 25  && me: withour this property it's reeeal small
	PROCEDURE Click
		CLEAR EVENTS
		CLOSE ALL
ENDDEFINE
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform