ON EXIT BAR

From Recital Documentation Wiki
Jump to: navigation, search

Purpose

Execute a command when the cursor moves off of a pop-up menu bar


Syntax

ON EXIT BAR <expN> OF <pop-up> [<command>]


See Also

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


Description

The ON EXIT BAR command is used to specify commands which will execute when the cursor moves off of the specified bar. A bar is a menu option in an Xbase style pop-up menu. These types of menus are created with the DEFINE POPUP and DEFINE BAR commands. The bar is identified by the numeric expression <expN> that was assigned with the DEFINE BAR command. 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 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 EXIT BAR command disables previously specified commands. Commands specified with the ON EXIT POPUP command execute on highlighted bars that do not have an ON EXIT BAR command associated with them.


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 bar 1 of files dialog box "Enter Bar 1"
on bar 2 of files dialog box "Enter Bar 2"
on exit bar 1 of files dialog box "Exit Bar 1"
on exit bar 2 of files dialog box "Exit Bar 2"
activate menu main


Products

Recital