@ ... CLASS Command

Example   See Also

Creates a control or object that can be activated with READ.

Syntax

@ nRow, nColumn CLASS ClassName NAME ObjectName

Arguments

@ nRow, nColumn

Specifies the position of the control or object. The height and width of the control or object is determined by the class default height and width values.

Rows are numbered from top to bottom. The first row is number 0 in the main Visual FoxPro window or in a user-defined window. Row 0 is the row immediately beneath the Visual FoxPro system menu bar.

Columns are numbered from left to right. The first column is number 0 in the main Microsoft Visual FoxPro window or in a user-defined window. When a control or object is placed in a user-defined window, the row and column coordinates are relative to the user-defined window, not to the main Visual FoxPro window.

A position in the main Visual FoxPro window or in a user-defined window is determined by the font of the window. Most fonts can be displayed in a wide variety of sizes; some are proportionally spaced. A row corresponds to the height of the current font; a column corresponds to the average width of a letter in the current font.

You can position the control or object using decimal fractions for row and column coordinates.

CLASS ClassName

Specifies the class of the control or object. ClassName can be a Visual FoxPro base class or a user-defined class. The following table lists the Visual FoxPro base classes you can specify for ClassName.

Base class names
CheckBox Line
Column ListBox
ComboBox OLEControl
CommandButton OLEBoundControl
CommandGroup OptionButton
Container OptionGroup
Control Page
Cursor PageFrame
Custom Relation
DataEnvironment Separator
EditBox Shape
Grid Spinner
Header TextBox
Image Timer
Label

NAME ObjectName

Specifies the name of the object reference variable to create. The object-oriented properties, events, and methods of the control or object can be manipulated by referencing this variable.

Remarks

@ ... CLASS provides an intermediate step for converting programs and applications created in earlier versions of FoxPro to the preferred object-oriented programming methods of Visual FoxPro. For additional information about backward compatibility with FoxPro 2.x controls, see Controls and Objects.

For information about object-oriented programming in Visual FoxPro, see Chapter 3, "Object-Oriented Programming," in the Programmer's Guide.

For information about object-oriented programming in Visual FoxPro, see Chapter 3, Object-Oriented Programming, in the Programmer's Guide.