Progress
Language Reference


HIDE Statement

Interfaces
OS
SpeedScript
All
All
No

Makes a widget invisible (sets its VISIBLE attribute to FALSE), or clears the message area for a window, or hides all widgets and clears messages in a window.

SYNTAX

HIDE [ STREAM stream ]
  [ widget-phrase | MESSAGE | ALL ]
  [ NO-PAUSE ]
  [ IN WINDOW window ] 

STREAM stream

Specifies the name of a stream. If you do not name a stream, Progress uses the unnamed stream.

widget-phrase

The widget you want to hide. You can hide windows, frames, and field-level widgets. You cannot hide menus. If you do not use this option or the MESSAGE or ALL options, HIDE hides the default frame for the block that contains the HIDE statement.

MESSAGE

Hides all messages displayed in the message area for the specified window. If you use the PUT SCREEN statement to display data in the message area, the HIDE MESSAGE statement does not necessarily hide that data.

ALL

Hides all widgets in the window and clears the message area for the window.

NO-PAUSE

Does not pause before hiding. Ordinarily, if data has been displayed, but there have been no data entry operations or pauses, Progress prompts you to press SPACEBAR to continue before hiding the widget.

IN WINDOW window

Specifies which window the HIDE statement acts on. The value window must evaluate to the handle of a window. If you do not use the IN WINDOW option, the current window is assumed.

EXAMPLE

The following example uses the HIDE statement to hide selected frames. The DISPLAY statements redisplays the frames when the loop iterates.

r-hide.p
DEFINE VARIABLE selection AS INTEGER FORM "9".

FORM   "Please Make A Selection:" SKIP(2)
       "    1. Hide Frame A.    " SKIP
       "    2. Hide Frame B.    " SKIP
       "    3. Hide All.        " SKIP
       "    4. Hide This Frame  " SKIP
       "    5. Exit             " SKIP(2)
       WITH FRAME X NO-LABELS.

REPEAT:
    VIEW FRAME x.
    DISPLAY "This is frame A."
      WITH FRAME a ROW 1 COLUMN 60.
    DISPLAY "This is frame B."
      WITH FRAME b ROW 16 COLUMN 10 4 DOWN.
    MESSAGE "Make your selection!".
    UPDATE "Selection: " selection
           VALIDATE(0 < selection AND selection < 7,
                    "Invalid selection")  AUTO-RETURN
           WITH FRAME x.

    IF selection = 1 THEN HIDE FRAME a.
    ELSE IF selection = 2 THEN HIDE FRAME b.
    ELSE IF selection = 3 THEN HIDE ALL.
    ELSE IF selection = 4 THEN HIDE FRAME x.
    ELSE IF selection = 5 THEN LEAVE.
    PAUSE.
END. 

NOTES

SEE ALSO

CLEAR Statement, VIEW Statement, Widget Phrase


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