DEFINE PAD

From Recital Documentation Wiki
Jump to: navigation, search

Purpose

Define pad locations for the main menu bar of an Xbase style menu


Syntax

DEFINE PAD <expC1> OF <expC2> PROMPT <expC3>

[AT <expN1>,<expN2>]

[COLOR <color code> | COLOR SCHEME <color scheme>]

[KEY <key label> [,<expC4>]

[MESSAGE <expC5>]

[SKIP [FOR <expL>]]


See Also

ACTIVATE MENU, ACTIVATE POPUP, CLEAR POPUPS, DEACTIVATE MENU, DEACTIVATE POPUP, DEFINE BAR, DEFINE MENU, DEFINE POPUP, ON PAD, ON SELECTION PAD, ON SELECTION POPUP, PADPROMPT(), RELEASE MENUS, RELEASE POPUPS, SET COMPATIBLE, SHOW MENU, SHOW POPUP


Description

The DEFINE PAD command defines the pad name <expC1> for the menu name <expC2> for Xbase style menus. The command SET COMPATIBLE should be set ON when using Xbase style menus. The menu name must first be defined with the DEFINE MENU command.

PROMPT <expC3>

The PROMPT <expC3> is displayed inside the menu option, placing a blank space to each side of the prompt when it is displayed.

AT <expN1>,<expN2>

The optional AT coordinates position the pad at row <expN1> and column <expN2> on the screen. If the AT coordinates are not supplied, the pads start in the upper left corner of the screen and place one space in between each prompt.

COLOR <color code> | COLOR SCHEME <color scheme>

The optional COLOR or COLOR SCHEME clause will display the pad in the colors defined by the <color code> foreground/background color pair or the numeric <color scheme>. For more information about color settings, please see the SET COLOR and SET COLOR OF SCHEME commands.

KEY <key label> [,<expC4>]

The optional KEY clause allows the pad to be chosen using the specified <key label>. For more information on key labels, please see the ON KEY LABEL command. If <expC4> is included, this character expression will be displayed instead of the default key label.

MESSAGE <expC5>

The optional MESSAGE clause displays <expC4> in the message line when the cursor is placed on the pad.

SKIP [FOR <expL>]

The SKIP clause allows a particular pad or to be disabled. If the optional FOR <expL> clause is included, the <expL> is evaluated. If the evaluation results in .T. (true) the pad is disabled, if .F. (false), the pad is enabled. If the FOR <expL> clause is not included, the pad is enabled.


Example

define pad file_nm of sort_men;
  prompt "Files";
  at 0,0;
  message "Use <- and -> keys to navigate menus"
define pad srt_type of sort_men;
  prompt "Structure";
  at 0,7;
  message "Use <- and -> keys to navigate menus"
define pad key_nm of sort_men;
  prompt "Fields";
  at 0,18;
  message "Use <- and -> keys to navigate menus"
define pad prfrm of sort_men;
  prompt "User-defined";
  at 0,26;
  message "Use <- and -> keys to navigate menus"
define pad endit of sort_men;
  prompt "Quit";
  at 0,40;
  message "Press ENTER to exit"


Products

Recital