Objects added to TVertScrollbox - problem in scrolling
I'm using a TVertScrollBox and i add some objects from code (TFrame with a Layout and three Label inside). The objects appear correctly, but when I move the scroller, the position of some labels, font size and bold status change in a random way. This happens in the same manner on Win32 and on Android.
The problem doesn't appear if i add manually (but is unuseful for my application) the Frames with the designer, inside the ide.
Someone can help me? Where is my mistake?
A fragment of my code, used for test. I assign Parent property of the Frame to the VertScrollBox. I have tryed the InsertComponent method too, but with no result.
arr : array[0..50] of TFrameValue;
procedure TForm1.FormShow(Sender: TObject);
i : integer;
for i := 0 to 20 do
arr[i] := TFrameValue.Create(nil);
arr[i].Parent := VertScrollBox1;
arr[i].Name := Format('frame%d',[i]);
arr[i].Align := TAlignLayout.Top;