REBOL Document

Hide - Function Summary


Summary:

Hides a face or block of faces.

Usage:

hide face

Arguments:

face - The face argument. (must be: object block)

Refinements:

/show - Refreshes the area under the face being hidden.

Description:

HIDE temporarily removes the face from view. It does not remove the face from its parent face's pane. The face will become visible again the next time the face is shown either directly or indirectly through one of its parent faces.

The example below creates a window with text and buttons. When clicked, the first two buttons will hide and show the third button.


    out: layout [
        vh2 "Hide Button"
        body "Hide the extra button."
        button "Hide It" [hide bt]
        button "Show It" [show bt]
        bt: button "Extra Button"
    ]
    view out

Multiple faces can be provided to HIDE as a block. The block normally contains face object references, but it will also accept the names of variables that hold faces.

To permanently remove a face from view, remove it from its parent face pane. The BT button above could be permanently removed with:


    remove find out/pane bt
    show out

The button could be put back with:


    append out/pane bt
    show out

In both cases, the SHOW is used to refresh the view, showing the change.

For top level faces (windows), HIDE is used by UNVIEW to close the window. In addition, UNVIEW removes the top level face from the screen-face pane.

Related:

show - Display a face or block of faces.


<Back | Index | Next>

Copyright 2004 REBOL Technologies