Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Why is a grid added to a form automatically bound to a table
Message
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
Why is a grid added to a form automatically bound to a table
Miscellaneous
Thread ID:
00364907
Message ID:
00364907
Views:
54
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
Next
Reply
Map
View

Click here to load this message in the networking platform