Progress
AppBuilder
Developer’s Guide


Enable_UI Internal Procedure

The Enable_UI internal procedure controls whether widgets are enabled for specific layouts. This procedure is used only for non-SmartObject procedure files. It uses the WHEN option of the ENABLE statement to determine whether a widget in a SmartObject is enabled.

Here is a sample Enable_UI procedure:

PROCEDURE enable_UI :
/*------------------------------------------------------------------------
  Purpose:     ENABLE the User Interface
  Parameters:  <none>
  Notes:       Here we display/view/enable the widgets in the
               user-interface.  In addition, OPEN all queries
               associated with each FRAME and BROWSE.
               These statements here are based on the "Other 
               Settings" section of the widget Property Sheets.
------------------------------------------------------------------------*/

  {&OPEN-QUERY-DEFAULT-FRAME}
  GET FIRST DEFAULT-FRAME.
  IF AVAILABLE Customer THEN 
    DISPLAY Customer.Cust-Num Customer.Name 
      WITH FRAME DEFAULT-FRAME IN WINDOW C-Win.
  ENABLE IMAGE-1 Btn_First Btn_Next Btn_Prev Btn_Last BROWSE-1 
         Btn_Photo WHEN NOT (SESSION:DISPLAY-TYPE = ’TTY’:U ) 
      WITH FRAME DEFAULT-FRAME IN WINDOW C-Win.
  {&OPEN-BROWSERS-IN-QUERY-DEFAULT-FRAME}
  VIEW C-Win.
END PROCEDURE. 

In this example, the Btn_Photo is enabled only if the standard character layout is not used at run time.


Copyright © 2004 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095