Bug #2801
Bug #2677: fix drawing and functional differences between P2J GUI and 4GL GUI
frame's dimension (from SIZE option) gets altered after frame attributes are set
0%
History
#1 Updated by Constantin Asofiei over 8 years ago
Hynek, please see this testcase:
def var hw as handle. create window hw assign width-pixels = 600 height-pixels = 200 title = "hw". current-window = hw. def var i as int. def var l as log. def var ch as char. def button btn label "btn". form i l ch btn with at row 1 col 1 side-labels size-pixels 500 by 500 with frame f1. frame f1:row = 2. frame f1:column = 2. hw:HEIGHT-PIXELS = FRAME f1:HEIGHT-PIXELS + 50. message hw:height-pixels frame f1:height-pixels. view frame f1. pause.
Although frame's SIZE option is used (and should act like a fixed-width, correct?), the frame's height is "adjusted" in Frame.adjustDown
. I don't understand why we need the Frame.originalHeightChars
field - shouldn't the fixedWidth
and fixedHeight
config fields be set, if size is set explicitly (regardless if is via the SIZE option or attributes)?
#2 Updated by Constantin Asofiei over 8 years ago
- one which uses screen size equal to the maximum possible dimension for a 4GL window. This is used until the frame is realized on a window, and accessing frame's size attributes will result in "unbounded" values.
- once the frame is placed on a window (when it's first made visible/realized), it will adjust its size so that is bound to the window's workspace size. Moving the frame to another window will not resize the frame.
The problem in the example above is that when Frame.setSizeImpl
is called, the frame is not yet placed on the screen, and it uses the current-window's screen size to limit the frame's size.
#3 Updated by Hynek Cihlar over 8 years ago
Constantin Asofiei wrote:
Hynek, please see this testcase:
[...]Although frame's SIZE option is used (and should act like a fixed-width, correct?), the frame's height is "adjusted" in
Frame.adjustDown
. I don't understand why we need theFrame.originalHeightChars
field - shouldn't thefixedWidth
andfixedHeight
config fields be set, if size is set explicitly (regardless if is via the SIZE option or attributes)?
I think there is a difference between setting size before frame has been displayed and after. But I am afraid I won't be able to give you more details.
#4 Updated by Greg Shah about 8 years ago
- Target version changed from Milestone 12 to Milestone 16
#5 Updated by Greg Shah over 7 years ago
- Target version changed from Milestone 16 to Cleanup and Stabilization for GUI