The function of_SetResize of pfc_w_master determines the original window size and sets it in the resize service (using of_SetOrigSize).
Problem: There are two variants how the window size can be determined:
- using WorkspaceWidth and WorkspaceHeight
- Reading the initial values of width and height variables from classdefinition.
Both variants are problematic:
- WorkspaceWidth and WorkspaceHeight are only correct, if a sheet is opened in its original size. Under some circumstances (sheet is much bigger than frame window) Powerbuilder reduces the window size on open even if sheet is opened in original size. So WorkspaceWidth/Height are smaller. Objects will be cut at right and bottom of the window.
- the initial values of width and height stored in the object are not the same as in the property view. So the resize service calculates with wrong value. So especially at the bottom of the window will be a gap.
Possible solution:
Because we don't know whether Powerbuilder reduces the size or not we can't use WorkspaceWidth/Height.
I suggest to read the initial values of window width and height and reduce them.
I assume that powerbuilder stores width and height including border width and title height. So a possible solution may be to subtract the border width (2 times) from "width" variable and the border height (2 times) and caption height from "height" variable.
The following window properties seems to have observed to calculate the correct window size:
ClientEdge, PaletteWindow, Border, Resizable, Titlebar, HScrollbar, VScrollbar, assigned menu
The function of_SetResize of pfc_w_master determines the original window size and sets it in the resize service (using of_SetOrigSize).
Problem: There are two variants how the window size can be determined:
Both variants are problematic:
Possible solution:
Because we don't know whether Powerbuilder reduces the size or not we can't use WorkspaceWidth/Height.
I suggest to read the initial values of window width and height and reduce them.
I assume that powerbuilder stores width and height including border width and title height. So a possible solution may be to subtract the border width (2 times) from "width" variable and the border height (2 times) and caption height from "height" variable.
The following window properties seems to have observed to calculate the correct window size:
ClientEdge, PaletteWindow, Border, Resizable, Titlebar, HScrollbar, VScrollbar, assigned menu