lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]



In IUP the vbox can be dinamicaly filled only using iup.Apped. The following code does what you want:

vb=iup.vbox{}
for a=1,10 do
  t=iup.text{value = tostring(a)}
  t["a"]=a
  t["action"] = function (self,c,after) print(tostring(self.a)) end
  iup.Append(vb, t)
end
dlg2=iup.dialog{vb}
dlg2:show()

Best,
scuri

At 11:22 27/12/2004, Mikolaj Dawidowski wrote:
Hi,

How to generate a dialog in runtime. I mean create list of controls and
add them to dialog. I tried this with obvious result:

ll={}
for a=1,10 do
  ll[a]=iup.text{value = tostring(a)}
  ll[a]["a"]=a
  ll[a]["action"] = function (self,c,after) print(tostring(self.a)) end
end
dlg2=iup.dialog{iu.vbox{ll}}


Best regards,
Nick