In designer, I create a main window with a label quite near its left margin, as seen in this screenshot:
However, when I launch the project (windowed or maximized, no difference), the label is very far from the left border, as can be seen in this other screenshot:
How can I get the label really to the left even in the launched project?
That’s the difference between Relative Positioning (the default) and Anchored Positioning. With relative, the window’s design dimensions are scaled to fix the actual window, scaling the components, with blank space on two of four edges as needed. With anchored, the coordinate space expands or contracts to fit the actual window, and you must specify (in the designer) how the components react – left, center, or right, and then top, middle, or bottom. Selecting both left and right and/or both top and bottom shrinks or stretches the component.