I have a "constuction" like in the image...
2 panels - one with a number of TLabels at the bottom. Labels are anchored to each other and Panel is Autosizing to accomodate the text.
Another TPanel at the top - anchored to the one below, so when text changes or form is resized, both panels change size.
The top panel contains two other panels, that each holds a TImage (as I want the panel borders around the images).
The image-panel on the right is set to anchor to the top right and bottom (or align alRight - same result), and the one on the left to fill up the rest of the space (anchored top left bottom and right to the containing panel, or alCLient - same result).
The image on the left, is set to fill the panel it is on; AutoSize, Center, Proportional, Stretch and StretchInEnabled set true.
The image on the right, is anchored to top right and bottom of the panel it is on, and it also has AutoSize, Center, Proportional, Stretch and StretchInEnabled set to true.
And it kind of all functions as expected, except for one thing:
The image on the right does not keep to the right; the TImage control always takes the width of the original image - not the scaled one, as it should when AutoSize is true - so if the original image is too big to fit the space, there is always "empty" space around it - either top/bottom which is OK, or left/right, which is not OK and should not occur. .
If I set Center to false, the image is actually to the left in the panel, which to me indicates, that the TImage does not take the width of the content (AutoSize) but the width of the original image.
Is there a way around this, other than manually calculating the correct width for the image/panel?