I have a TW3Scrollbox on my layout. On the scrollbox I have a TW3Image, which I am trying to place below a label (fDates) and center it in the Scrollbox. The images is 150 X 150.
I can't seem to get the image to display in the correct position using setbounds. Its always off to the right.
when I use showmessages to display the image width and height, those are off too.
How do I get the image to be sized 150 X 150 and center in the scrollbox?
procedure TfrmNavigation.ResizeContent; begin fImage.SetBounds((fScrollBox.Content.clientWidth div 2)-75, fDates.Top + fDates.Height, (fScrollBox.Content.clientWidth div 2)+75, fDates.Top + fDates.Height + 150); end; procedure TfrmNavigation.Resize; begin inherited; if assigned(FLayout) then begin FLayout.Resize(self); ResizeContent; end; end;