Gustav Schubert 25 Posted September 30, 2020 FMX Rio: ClientHeight is not up to date in FormResize when the form is moved back from a second monitor which has a higher value screen scale. Can this be reproduced in 10.4? If so I would report it, and update this post. Minimal sample with problem in 10.3.3: New app with one TRectangle on main form. Add OnResize handler as given below. Run on Windows. Test with two monitors of different scaling. Main monitor = 1.0 and second monitor to the right = 1.25. Drag Form1 from one monitor to other and then back to see problem. Drag the right border of form to resize again and correct the problem. Problem shows after dragging back from right to main monitor. There is a gap between Rectangle.Bottom and Form.Bottom. It seems to be the diff in actual and perceived ClientHeight, 8 pixel in my setup. Problem will be corrected if form is resized, because then ClientHeight will be good in FormResize. procedure TForm1.FormResize(Sender: TObject); begin { Rectangle1: TRectangle } // Rectangle1.Width := ClientWidth - Rectangle1.Position.X; Rectangle1.Height := ClientHeight - Rectangle1.Position.Y; Caption := Format('%d - %d - %.2f', [Height, ClientHeight, Rectangle1.Scene.GetSceneScale]); end; Share this post Link to post
Gustav Schubert 25 Posted October 1, 2020 The cost of using OnResizeEnd is rather high, as of now. Share this post Link to post