[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: IUP related
- From: Mikolaj Dawidowski <dawm@...>
- Date: Tue, 28 Dec 2004 09:33:44 +0100
Thanks for the reply!
After dlg:show(), or showxy adding controls requires resizing the dialog to position the controls properly.
At this moment I change its size +1 and -1 to refresh dialog.
Is there a better solution?
Maybe it is possible to explicitly place the control at desired position giving x,y?
Best regards
Nick
On Mon, 27 Dec 2004 13:37:17 -0200
Antonio Scuri <scuri@tecgraf.puc-rio.br> wrote:
>
> 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
>
>