@ ... Class
The @ ... Class command allows you to create objects programmatically on a form. We recommend using the Form Designer rather than this command.
Usage |
@ nRow, nColumn CLASS cClassName NAME nObjName |
Parameter |
Value |
Meaning |
nRow |
Numeric |
Row on which the object should appear. Equivalent to objName.Top. |
nColumn |
Numeric |
Column in which the object should appear. Equivalent to objName.Left. |
cClassName |
Character |
Name of a FoxPro built-in class or a hand-coded class definition. |
nObjName |
Character |
The name for the object. The object's properties, events and methods can be referenced using this name. |
Example |
ON KEY LABEL F11 CLEAR READ oForm = CREATEOBJECT("Form") oForm.Show() @ 10,10 CLASS "TextBox" NAME txtMyTextBox oForm.PageFrame1.Page1.txtMyTextBox.Value = "Ta-da!" oForm.PageFrame1.Page1.txtMyTextBox.BackColor = 255 READ && press F11 to get out of this weird READ |
See Also |