Consultor Eletrônico



Kbase P121805: Scrollbars appear after resizing window to a smaller size
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   24/01/2007
Status: Unverified

SYMPTOM(s):

Resizing standard window

Scrollbars appear when the window is made smaller after being maximized

Default-frame is resized programmatically to match the current size of the window

Using the WINDOW-RESIZED trigger

Trigger contains the following code:

ASSIGN FRAME default-frame:HEIGHT-PIXELS = c-win:HEIGHT-PIXELS - .5
FRAME default-frame:WIDTH-PIXELS = c-win:WIDTH-PIXELS - .5
.

CAUSE:

The resize of the Default-frame also causes the VIRTUAL size of the Default-frame to change. The Default-frame is SCROLLABLE by default so when the window is restored or made smaller, the visible portion of the Default-frame (represented by HEIGHT-PIXELS/WIDTH-PIXELS) is modified but the size of the entire frame (represented by VIRTUAL-HEIGHT-PIXELS/VIRTUAL-WIDTH-PIXELS) is not. Since the total size of the frame is greater than the window size, the scrollbars appear.

FIX:

Modify the VIRTUAL-HEIGHT-PIXELS and VIRTUAL-WIDTH-PIXELS attributes of the Default-frame to match the HEIGHT-PIXELS and WIDTH-PIXELS settings:

ASSIGN FRAME default-frame:HEIGHT-PIXELS = c-win:HEIGHT-PIXELS - .5
FRAME default-frame:WIDTH-PIXELS = c-win:WIDTH-PIXELS - .5
FRAME default-frame:VIRTUAL-HEIGHT-PIXELS = c-win:HEIGHT-PIXELS - .5
FRAME default-frame:VIRTUAL-WIDTH-PIXELS = c-win:WIDTH-PIXELS - .5
.