Consultor Eletrônico



Kbase 13942: User wishes to remove buttons from window decoration in V7
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   10/05/1998
User wishes to remove buttons from window decoration in V7


CAN I DELETE THE BUTTONS ENTIRELY?
----------------------------------

Many users have asked whether it is possible to remove the buttons
that appear on the window decoration when windows are created in
Version 7 GUI. These buttons allow for window maximize/minimize
and/or closure and typically appear in the upper left and right
corners of the window decoration.

It is NOT possible to create a window widget in PROGRESS which omits
these buttons. This is due to the fact that PROGRESS accesses a
native window widget when creating the window, and the buttons are
built into the widget. Since the windowing systems do not provide
us with "hooks" by which we can tell it to leave off the buttons,
there are no window attributes which can address the situation, nor
is it possible to add them on via a product enhancement.

Development has stated that to allow programmers to omit the buttons
would mean having to write our own window widget -- an approach they
do not wish to take due to our wish to use only native widgets where
at all possible.


CAN I DISABLE THEIR FUNCTIONALITY?
----------------------------------

If the buttons cannot be deleted altogether, then can their
functionality at least be disabled?

For maximization, you simply have to make sure you do not write code
that maximizes the window in response to the WINDOW-MAXIMIZE event.

For minimization, it is NOT possible to disable the function, since
by the time PROGRESS has received the WINDOW-MINIMIZE event from
the native environment the window has already been minimized. It *is*
possible, however, to put the window back into the WINDOW-NORMAL state
by setting its WINDOW-STATE attribute in response to the WINDOW-
MINIMIZE event:

ON WINDOW-MINIMIZE OF window-1 DO:
window-1:WINDOW-STATE = 3.
END.

Note, however, that this will result in an unavoidable flash of the
window as it is minimized and then immediately set to normal again.
This again is due to the fact that the minimize event has happened by
the time PROGRESS knows to respond to it.

For window closure, you can disable the window ventilator CLOSE by
coding a RETURN NO-APPLY for the WINDOW-CLOSE event. (At the same
time, make sure you're not coding your WAIT-FOR statement to look
for the WINDOW-CLOSE. Users of the UIB should also be sure to look
closely at the default version of the Main Block for code that already
exists for the WINDOW-CLOSE event.)

Progress Software Technical Support Note # 13942