For Loop Help

I’ve created a for loop, to create questions the user defined number of times. Here is my code:


local Question = {}
for i=1, HelpNPC.NumberOfQuestions do
	
	Question* = vgui.Create("DButton", frame)
	Question*:SetSize(580,40)
	Question*:SetFont("Questions")
	Question*:SetTextColor(HelpNPC.TextColor)
	Question*.Paint = function(s, w, h)
	draw.RoundedBox(5,0,0,w,h,HelpNPC.SecondaryColor)
	end

end 

(Anything beginning with HelpNPC is a variable that is created further up btw).

I was wondering, is there a way to set the position inside the for loop so that it increases dynamically?

Like, rather than putting:


Question[1]:SetPos(580,100)
Question[2]:SetPos(580,200)
Question[3]:SetPos(580,300)

and so on…

Would there be a way to create this inside the for loop, so that it would increase by, for example, 50 each time? Thanks.

Use a layout element or do 530 + (50 * i)

Thanks Pat