ON POPUP

From Recital Documentation Wiki
Jump to: navigation, search

Purpose

Execute a command when a bar is highlighted


Syntax

ON POPUP <pop-up> [<command>]


See Also

ACTIVATE POPUP, BAR(), DEACTIVATE POPUP, DEFINE BAR, DEFINE POPUP, ON EXIT BAR, ON EXIT POPUP, ON SELECTION BAR, ON SELECTION POPUP, POPUP(), PROMPT(), SET COMPATIBLE, SHOW POPUP


Description

The ON POPUP command is used to specify commands which will execute when menu bars that do not have an ON BAR command associated with them are highlighted. A bar is a menu option in an Xbase style popup menu. These types of menus are created with the DEFINE POPUP and DEFINE BAR commands. The pop-up menu is identified by the name <pop-up> that was assigned with the DEFINE POPUP command. The command SET COMPATIBLE should be ON when using Xbase style menus.

<command> The specified command may be any the Recital/4GL command. To specify a command that will execute when a bar is selected, see the ON SELECTION BAR command. Used without a specified command, the ON POPUP command disables previously specified commands. Commands specified by an ON BAR command override commands specified by the ON POPUP command.


Example

define menu main
define pad exit of main;
  prompt "\<Exit" at 0,0
define pad filelist of main;
  prompt "\<Files" at 0,6
 
on pad filelist of main activate popup files
on selection pad exit of main deactivate menu
 
define popup files from 1,06
define bar 1 of files prompt "\<Programs"
define bar 2 of files prompt "\<Databases"
 
on popup files dialog box "On Popup"
on exit popup files dialog box "On Exit Popup"
activate menu main


Products

Recital