(
  local TSE

       
  struct temp
  (
                  var = 0 --dont change this its needed for creation of the instance so the compiler doesnt make TSE a ref target to temp
                  ,
               
                  sub1 = rollout sub1 "Wirecolor"
                  (
                                  edittext etName "Name"
								  colorpicker clpkrWirecolor "Wirecolor" fieldwidth:75
                               
                  )--END sub1 RO
                  ,
               
                  sub2 = rollout sub2 "Box"
                  (
								spinner spnBoxLength "Length: " fieldwidth:61 height:16 range:[0,9999,0] offset:[-6,0] 
								spinner spnBoxWidth "Width: " fieldwidth:61 height:16 range:[0,9999,0] offset:[-6,0]
								spinner spnBoxHeight "Height: " fieldwidth:61 height:16 range:[0,9999,0] offset:[-6,0]
                               
                  )--END sub2 RO
                  ,
               
                  sub3 = rollout sub3 "Name"
                  (
                                  edittext etName "Name"
                               
                  )--END sub3 RO
                  ,
               
                  main = rollout main "bar" width:200 height:200
                  (
                          local subs = #(1,2,3)

                       
                          button sub1BTN "" width:(main.width/subs.count) height:24 pos:[0,0]
                          button sub2BTN "" width:(main.width/subs.count) height:24 pos:(sub1BTN.pos+[main.width/subs.count,0])
                          button sub3BTN "" width:(main.width/subs.count) height:24 pos:(sub2BTN.pos+[main.width/subs.count,0])
						  button btnCreate "Create" width:(main.width) height:24 pos:([0,main.height-24])
                       
                          subRollout sRO width:main.width height:(main.height-24-24) pos:[0,24]
                       
                       
                          on sub1BTN pressed do
                          (
                                          for RO in sRO.rollouts do removeSubRollout sRO RO
                                          addSubRollout sRO subs[1]
                                       
                          )--END sub1BTN.pressed
                       
                          on sub2BTN pressed do
                          (
                                          for RO in sRO.rollouts do removeSubRollout sRO RO
                                          addSubRollout sRO subs[2]
                                       
                          )--END sub1BTN.pressed
                       
                          on sub3BTN pressed do
                          (
                                          for RO in sRO.rollouts do removeSubRollout sRO RO
                                          addSubRollout sRO subs[3]
                                       
                          )--END sub1BTN.pressed
                       
                       
                          on main open do
                          (
                                  subs = #(TSE.sub1, TSE.sub2,TSE.sub3)

                                  sub1BTN.caption = subs[1].title
                                  sub2BTN.caption = subs[2].title
                                  sub3BTN.caption = subs[3].title
                                       
                          )--END main.open
                       
                               
                  )--END main RO
               
  )--END struct

  TSE = temp var:1

  createdialog TSE.main

)--END local scope
