require( "iuplua" ) require( "iupluacontrols" ) side = 7 width = 100 local bar = iup.colorbar{ orientation="HORIZONTAL", num_parts=tostring(side), num_cells=tostring(side^2), show_preview="NO", rastersize=tostring(width).."x"..tostring(width), } local customBar = iup.colorbar{ orientation = "VERTICAL", num_parts = tostring(side), num_cells = tostring(side*2), show_preview = "NO", --expand="NO", rastersize=tostring(width).."x40" } local label = iup.label{ title = "Custom Colors:", expand = "YES", bgcolor = "230 250 255", } local dlg = iup.dialog{ iup.frame{ iup.vbox{ bar, iup.frame{label,bgcolor="230 250 255"}, --label, customBar, } }; -- expand = "NO", } dlg:show() -- Main IUP events loop if (iup.MainLoopLevel()==0) then iup.MainLoop() end