Command APPDISPLAY Foundation
Displays an Application Part and activates it.
APPDISPLAY [ <oApp> ] [ MODELESS ] [ SAVE ]
The command APPDISPLAY displays an Application Part (APP) that is created by commands like APPEDIT or APPBROWSE. Those APPs which have an own dialog window are displayed in modal state by default.
Modal display means that the execution of a program is halted in the program line that issues the APPDISPLAY command. A program resumes when the APP is closed by a user.
The option MODELESS must be used to display an APP in modeless state. In this case the program is not halted but immediately continues in the line following the APPDISPLAY command. A program must include an event loop when APPs are displayed modeless (see function AppEvent()). Also, displaying multiple APPs at a time requires the MODELESS option.
// The example demonstrates how to create and display modeless
// Application Parts. A browser and an edit dialog is created.
// Both access the same database. If one APP navigates the
// record pointer, the other one is automatically synchronized
// and updated.
#include "Appbrow.ch"
#include "Appedit.ch"
#include "Appevent.ch"
PROCEDURE AppSys
// Desktop remains application window
RETURN
PROCEDURE Main
LOCAL nEvent, mp1, mp2, obj
LOCAL oEdit, oBrowse
USE Customer // Open database
APPBROWSE INTO oBrowse ; // Define browser
FIELDS Firstname, Lastname, Phone, Street, Zip, City ;
TITLE "Address List" ;
POSITION LEFT, CENTER ;
SIZE 40 PERCENT
APPEDIT INTO oEdit ; // Define edit dialog
TITLE "Customer Addresses" ; // It contains all fields
POSITION RIGHT, CENTER ; // of the work area
SIZE 40 PERCENT
APPDISPLAY oBrowse MODELESS // Display Application Parts
APPDISPLAY oEdit MODELESS // modeless
DO WHILE nEvent <> xbeP_Close // Process events
nEvent := AppEvent( @mp1, @mp2, @obj )
obj:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.