Release 10.1A: OpenEdge Development:
ADM Reference

> ## hideObject

> Procedure that hides the current object if it is a visual object and sets the ObjectHidden property to TRUE to indicate the state of the object.

> Location: smart.p

> Parameters: None

> Notes:

> - The Hide concept is a logical one; nonvisual objects might also be hidden, meaning that they are not currently active. This might affect whether code in some event procedures is executed. For example, SmartDataObjects does not respond to events such as fetchNext and fetchLast if they are logically hidden, even though they have no visualization. This allows certain SmartLinks to be effectively deactivated when the object at one end or the other is hidden.

> - When a SmartContainer is hidden, it is not necessary for all of the objects it contains to be individually hidden because they are hidden along with the container. For this reason, hideObject, when executed for a SmartContainer, sets the property ContainerHidden in each contained SmartObject without actually running hideObject in each object. The setContainerHidden function, in turn, sets the ObjectHidden property to TRUE so that it can be queried successfully. Not running hideObject in each individual SmartObject improves performance when SmartObjects are being paged (alternately hidden and viewed), and can eliminate problems with flashing of visual objects or problems restoring proper frame order when objects are hidden and viewed.

> - The hideObject procedure can be localized when behavior in addition to the default is needed when a SmartObject is hidden, for example to decide whether a hidden component should actually be destroyed to conserve memory.

> Examples:

>     ON CHOOSE OF MENU-ITEM mi_Hide_Children
>     DO:
>       DEFINE VARIABLE cHandles AS CHARACTER NO-UNDO.
>       DEFINE VARIABLE hSMO     AS HANDLE    NO-UNDO.
>       DEFINE VARIABLE i        AS INTEGER   NO-UNDO.
>       /* Find all the children of a SmartWindow and HIDE the child windows. */
>       CHandles = dynamic-function(‘linkHandles’:U,
>         INPUT ‘Container-Target’:U).
>       DO i = 1 TO NUM-ENTRIES (cHandles):
>         /* cHandles is a comma-separated list of SmartObject handles. */
>         hSMO = WIDGET-HANDLE(ENTRY(i, cHandles)).
>         /* See if this SmartObject is a SmartWindow. */
>          IF dynamic-function(‘getObjectType’:U IN hSMO) = "SmartWindow":U THEN
>           RUN hideObject IN hSMO.
>       END.
>     END.

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