Skip to content

Window resize service - original size #19

Description

@TABUllrich

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:

  1. using WorkspaceWidth and WorkspaceHeight
  2. Reading the initial values of width and height variables from classdefinition.

Both variants are problematic:

  1. 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.
  2. 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions