restart: with(Maplets): with(Maplets[Elements]): Show:=proc() if IsBoxLayout then Display( Maplet( Window[BL]( layout=BoxLayout[BoxL](inset=GInset, BoxColumn(border=true,inset=0, BoxRow(inset=0,BoxCell(Label(S)),BoxCell(Label(S))), BoxRow(inset=0,BoxCell(Label(S)),BoxCell(Label(S))), BoxRow(inset=0,BoxCell(Button("Close",CloseWindow(BL)) ) ) ) ) ) ) ) else Display( Maplet( Window[GL]( layout=GridLayout(inset=GInset, GridRow( GridCell( GridLayout(inset=0,border=true, GridRow( GridCell(BoxLayout(inset=0,border=true,Label(S))), GridCell(BoxLayout(inset=0,border=true,Label(S))) ), GridRow(GridCell(Label(S)),GridCell(Label(S))), GridRow(GridCell(width=2,Button("Close",CloseWindow(GL)))) ) ) ) ) ) ) ) end if: end proc: S:="Nothing": IsBoxLayout:=true: GInset:=10: Inset:=proc() global GInset: Maplets:-Tools:-Get('TF'): GInset:=op(sscanf(%,"%d")): end proc: Select:=proc() global IsBoxLayout: IsBoxLayout:=not IsBoxLayout: end proc: M:=Maplet(onstartup=RunWindow(Control), Window[Control]( layout=BoxLayout( BoxColumn( BoxRow(border=true,inset=0, BoxCell( RadioButton("BoxLayout",group=RBG,value=true) ), BoxCell( RadioButton("GridLayout",group=RBG,value=false) ) ), BoxRow(inset=0, BoxCell(halign=right,Label("inset")), BoxCell(halign=left,TextField[TF](2,value=GInset,onchange=Evaluate(function="Inset"))) ), BoxRow(inset=0, BoxCell( Button("Show",onclick=RWs) ), BoxCell(Button("Quit",Shutdown()) ) ) ) ) ), ButtonGroup[RBG](onchange=Evaluate(function="Select")), Action[RWs](Evaluate(function="Show")) ): Display(M);