CommandButton Control

Properties   Events   Methods   Example   See Also

Creates a single command button.

Syntax

CommandButton

Remarks

A command button is typically used to start an event that performs an action such as closing a form, moving to a different record, printing a report, and so on. Use the CommandGroup control to create a set of command buttons that you can manipulate individually or as a group.

Use the Caption property to specify the text that appears on a command button. Use the Picture property to specify a picture for a command button.

You can choose a command button by clicking it, and, if the Default property is set to true (.T.), by pressing the ENTER key when the command button is selected. If the Cancel property of the command button is set to true (.T.), you can choose the command button by pressing the ESC key.

For additional information about command buttons, see the Form Designer topic and Chapter 10, Using Controls, in the Programmer's Guide.