次の方法で共有


Controls and Objects Created in Earlier Versions

This topic describes support for controls and objects created in earlier FoxPro versions. Some controls behave slightly differently depending on whether you are using Visual FoxPro for Windows or Visual FoxPro for Macintosh; by default, controls in Visual FoxPro for Macintosh follow user interface conventions common to Macintosh applications. For example, by default the CheckBox, ComboBox, and OptionButton controls cannot receive the focus in Visual FoxPro for Macintosh. For more details about differences in control behavior, see the topic for the SET KEYCOMP command.

In Visual FoxPro, a NAME clause is available for each of the controls created in previous FoxPro versions. The NAME clause creates an object reference for controls created with @ ... GET and @ ... EDIT and allows you to manipulate the controls with Visual FoxPro properties, events, and methods. The NAME clause provides an intermediate step to upgrade your applications using Visual FoxPro object-oriented programming techniques.

Compatibility with FoxPro 2.x Controls

The following table lists the controls available in earlier FoxPro versions and the base class you can use to programmatically create the same control in Visual FoxPro.

FoxPro 2.x controls

Equivalent VisualFoxPro controls

Visual FoxPro base class names

@ ... GET - Check Boxes

CheckBox Control

CheckBox

@ ... GET - Lists

ListBox Control

ListBox

@ ... GET - Popups

ComboBox Control

ComboBox

@ ... GET - Push Buttons

CommandButton Control

CommandButton

@ ... GET - Radio Buttons

OptionButton Control

OptionButton

@ ... GET - Spinners

Spinner Control

Spinner

@ ... GET - Text Boxes

TextBox Control

TextBox

@ ... EDIT - Text Edit Regions

EditBox Control

EditBox

For a complete list of base classes in Visual FoxPro, see Base Classes in Visual FoxPro.

See Also

Reference

CREATE CLASS Command

CREATE FORM Command

DEFINE CLASS Command

Other Resources

Objects, Collections, and Classes

Language Reference (Visual FoxPro)

Backward-Compatible Language Elements