About Button components

Button (PushButton) components initiate an action such as running a procedure or launching a form.

To define the action initiated by a button, specify an event handler for the button's Primary event in the Events property sheet.

Note: To display "\n" in the caption instead of it being interpreted as a new line, set the No Interpret New Lines property to TRUE.

To display a bitmap or icon on a button, set the Bitmap File Name property in the Components property sheet.

Windows client provides several specialized forms of buttons, some of which are available from the Design Mode Toolbox, and some of which are only available from the Type property on the Component properties sheet:

  • CancelPushButton (only from the Type list): A specialized button component that is preset to cancel the current action and close the form.
  • DefPushButton (only from the Type list): A specialized button that becomes the default button for action when the user presses the Enter key. If another button or component has received the focus after a form is opened, then that component is acted upon when Enter is pressed; this key becomes the default action only if the focus has not been manually moved elsewhere.
  • Hyperlink Button: A specialized button component that allows you to create a "button" that looks and behaves like standard hyperlinked text.
  • Toolbar Button: A specialized component that creates a button intended to appear on the main toolbar. This is not, strictly speaking, a "push button" like the others.