Windows DPI Form Scaling

I previously used VGScene (the predecessor of Firemonkey) to build the application and recently switched to Delphi XE2 Firemonkey.

To scale my form in VGScene, all I had to do was scale the Root object of the VGScene object to scale all the content on the form. However, I'm not sure how to do this with FireMonkey.

My form consists of two TLayouts, one for left alignment and one for client alignment, with a vertical divider between the left and client layouts. The client’s layout also has a list box on which client alignment is set.

I tried to have a basic TLayout with all my controls and scale the basic TLayout, but this is not entirely correct, the left layout is scaled properly, but the list of client layouts seems to go past the right and bottom edges of the client layout object? those. when you have a complete list, the list items go past the right edge of the form (which are cropped), and the vertical scroll bar does not appear completely, as it passes the bottom of the form. As if the width and height of the client’s layout are scaled to the size that is larger than the form allows, but if it does not fill the form area yet?

I tried just to scale a single object, for example, just to scale the list, but this gives the same result, the list goes beyond the form.

Does anyone have any ideas?

+4
source share
1 answer

One of the possibilities is that you definitely did not follow the instructions for selecting controls and a splitter as recommended in the TSplitter documentation ?

If you haven’t done so, it’s easy to get to the point where all the properties seem to be set to the correct values, but somehow the controls and the splitter just don't interact. I would recommend trying again, paying particular attention to getting align properties with the correct values, i.e. alLeft on the left component, alLeft on the delimiter and alClient on the right.

0
source

Source: https://habr.com/ru/post/1393832/


All Articles