Hi, The labels won't get the same size unless you do something about it. By default the gridbox will only distribute the elements.
There are many ways to change the size of the labels, or to change the space they occupy. - For instance you can manually set the width of the label at line 0 (the reference line). - do: grid.normalizesize = "HORIZONTAL" or grid.homogeneouscol = "Yes" or dialog:map() grid.fittochildren = "C0" -- This one has a bug that I just fixed. dialog:showxy(0,200) Which one to use depends on the result you want. Best, Scuri > -----Original Message----- > From: Victor Bombi [mailto:[email protected]] > Sent: sábado, 31 de maio de 2014 05:38 > To: IUP discussion list. > Subject: [Iup-users] grid work > > Hello, > > I am not able to make the grid work. Labels dont get the same width. > > --------------------gridtest.lua > require"iuplua" > require("iupluacontrols") > > telems = { > {"perlinfac",2.6,iup.val,{min=0,max=10}}, > {"perlindistfac",0.023,iup.val,{min=0,max=0.1}}, > {"plane_angle",0,iup.dial,{orientation="CIRCULAR"}}, > {"angle",0,iup.dial,{orientation="CIRCULAR"}} > } > > local elems = {} > for i,elem in ipairs(telems) do > local name = elem[1] > local inival = elem[2] > local verb = elem[3] > local args = elem[4] or {} > > local label = iup.label{title=name} > local labelval = iup.label{title=string.format("%.3f",inival)} > local ctrl = verb(args) > ctrl.expand = "YES" > ctrl.value = inival > > table.insert(elems,label) > table.insert(elems,ctrl) > table.insert(elems,labelval) > end > > local butreset = iup.button{title="Reset"} > local butsave = iup.button{title="Save"} > local butload = iup.button{title="Load"} > local butbox = iup.hbox{butreset,butload,butsave} > > local grid = iup.gridbox(elems) > grid.NUMDIV = 3 > grid.sizecol = 1 > > local content = iup.vbox{grid,butbox} > content.ALIGNMENT ="ACENTER" > > dialog = iup.dialog{content,title=title,topmost="YES"} > dialog:showxy(0,200) > > iup.MainLoop() > -------------------- > > Thanks > > victor > > ---------------------------------------------------------------------------- -- > Time is money. Stop wasting it! Get your web API in 5 minutes. > www.restlet.com/download > http://p.sf.net/sfu/restlet > _______________________________________________ > Iup-users mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/iup-users ------------------------------------------------------------------------------ HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions Find What Matters Most in Your Big Data with HPCC Systems Open Source. Fast. Scalable. Simple. Ideal for Dirty Data. Leverages Graph Analysis for Fast Processing & Easy Data Exploration http://p.sf.net/sfu/hpccsystems _______________________________________________ Iup-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/iup-users
