Consultor Eletrônico



Kbase 16720: Recommended method of toggling SESSION:V6DISPLAY setting
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   5/10/1998
Recommended method of toggling SESSION:V6DISPLAY setting

If you wish to toggle the setting of the SESSION:V6DISPLAY attribute,
you should use code similar to the following example. This code
sample hides only windows which are currently visible. Note that
you should not hide frames within the window(s). Then, the attribute
setting is reversed and only those windows which were hidden are
viewed once again.

ON CHOOSE OF <yourbutton> /* or whatever event you define */
DO:
def var win as handle.

/* hide all visible windows and mark them so we know which ones
** to view after changing the value of SESSION:V6DISPLAY
*/
win = session:first-child.
do while (win <> ?) :
if win:visible = true then
do:
hide win.
win:private-data = "x".
end.
win = win:next-sibling.
end.

/* flip session:v6display */
session:v6display = not session:v6display.
message session:v6display.

/* now view the windows which we hid above */
win = session:first-child.
do while (win <> ?) :
if win:private-data = "x" then
do:
/* unhide the window and clear our marker */
view win.
win:private-data = "".
end.
win = win:next-sibling.
end.

END.

Progress Software Technical Support Note # 16720