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2,2,2}, {2,2,3,3,3,3,3,3,3,3,3,3,3,3,3,3,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2}, {2,3,3,3,3,3,3,3,3,3,3,3,3,3,3,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2}, {3,3,3,3,3,3,3,3,3,3,3,3,3,3,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2}; colors = { "0 255 0", -- 1 "BGCOLOR", -- 2 "255 0 0", -- 3 "0 0 0" -- 4 } } mnu = iupmenu { iupsubmenu { iupmenu { iupitem{title="IupItem 1 Checked",value="ON"}, iupseparator{}, iupitem{title="IupItem 2 Disabled",active="NO"} } ;title="IupSubMenu 1" }, iupitem{title="IupItem 3"}, iupitem{title="IupItem 4"} } dlg = iupdialog { iupvbox { iuphbox { iupframe { iupvbox { iupbutton{title="Button Text"}, iupbutton{title="",image=img1}, iupbutton{title="",image=img1,impress=img2} } ;title="IupButton" }, iupframe { iupvbox { iuplabel{title="Label Text"}, iuplabel{title="",separator="HORIZONTAL"}, iuplabel{title="",image=img1} } ;title="IupLabel" }, iupframe { iupvbox { iuptoggle{title="Toggle Text", value="ON"}, iuptoggle{title="",image=img1,impress=img2}, iupframe { iupradio { iupvbox { iuptoggle{title="Toggle Text"}, iuptoggle{title="Toggle Text"} } } ;title="IupRadio" } } ;title="IupToggle" }, iupframe { iupvbox { iuptext{size="80x",value="IupText Text"}, iupmultiline{size="80x60",expand="YES",value="IupMultiline Text\nSecond Line\nThird Line"} } ;title="IupText/IupMultiline" }, iupframe { iupvbox { iuplist{"Item 1 Text","Item 2 Text","Item 3 Text"; expand="YES",value="1"}, iuplist{"Item 1 Text","Item 2 Text","Item 3 Text"; dropdown="YES",expand="YES",value="2"}, iuplist{"Item 1 Text","Item 2 Text","Item 3 Text"; editbox="YES",expand="YES",value="3"} } ;title="IupList" } }, iupcanvas{bgcolor="128 255 0"} ;gap="5",alignment="ARIGHT",margin="5x5" } ;title="IupDialog Title", menu=mnu } dlg:show()