<div dir="ltr"><div><div>Thank you Mattias,</div><div>unique names solved the issue, I was wrongly naming frames: MyFrames[i].Name := Format('Frame%d', [i]);</div><div><br></div><div>Last question: I am creating Frames within a ScrollBox, but it look like there is a limit of the ScrollBox height to 32768 pixels.</div><div><br></div><div>I'd like to display up to 500 questions (Frames), how can I solve this issue?</div></div><div><br></div><div><img src="cid:ii_15cfad5b31fd7773" alt="Inline images 1" width="362" height="188"><br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On 30 June 2017 at 22:59, Mattias Gaertner via Lazarus <span dir="ltr"><<a href="mailto:lazarus@lists.lazarus-ide.org" target="_blank">lazarus@lists.lazarus-ide.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Fri, 30 Jun 2017 22:46:17 +0200<br>
Sandro Cumerlato via Lazarus <<a href="mailto:lazarus@lists.lazarus-ide.org">lazarus@lists.lazarus-ide.org</a><wbr>> wrote:<br>
<br>
> Thank you Adrian for your reply,<br>
> I can create a good layout with Frames, but it looks like I cannot create<br>
> multiple frames on the same form... Duplicate name: A component named<br>
> "Frame1" already exists.<br>
><br>
> I tried to create an array of Frames at runtime:<br>
><br>
> Question 1? (Option A) (Option B)<br>
> Question 2? (Option A) (Option B)<br>
> Question 3? (Option A) (Option B)<br>
> Question 4? (Option A) (Option B)<br>
> ...<br>
> Question 200? (Option A) (Option B)<br>
><br>
><br>
> var<br>
> MyFrames: array[1..200] of TFrame1;<br>
><br>
><br>
> Where am I wrong?<br>
<br>
</span>Give your frames unique names.<br>
<br>
DisableAutoSizing;<br>
try<br>
for i:=1 to 200 do begin<br>
MyFrames[i]:=TFrame1.Create(<wbr>Self);<br>
with MyFrames[i] do begin<br>
Name:='MyFrame'+IntToStr(i);<br>
Top:=i*Height;<br>
Parent:=Self;<br>
end;<br>
end;<br>
finally<br>
EnableAutoSizing;<br>
end;<br>
<br>
<br>
Mattias<br>
<div class="HOEnZb"><div class="h5">--<br>
______________________________<wbr>_________________<br>
Lazarus mailing list<br>
<a href="mailto:Lazarus@lists.lazarus-ide.org">Lazarus@lists.lazarus-ide.org</a><br>
<a href="http://lists.lazarus-ide.org/listinfo/lazarus" rel="noreferrer" target="_blank">http://lists.lazarus-ide.org/<wbr>listinfo/lazarus</a><br>
</div></div></blockquote></div><br></div>