//////////////////////////////////////////////////////////////// // // ScrollBarDemo.q // //////////////////////////////////////////////////////////////// //(New ScrollBarDemo) (DefClass ScrollBarDemo (: Window) ready polygon scrollBar1 scrollBar2 scrollBar3 scrollBar4 (Def (scrollBar_ValueChanged sender e) (Local collection point1 point2 point3 point4) (When (== ready TRUE) (Setq collection polygon.Points) (Setq point1 (Elt collection 0)) (Setq point2 (Elt collection 1)) (Setq point3 (Elt collection 2)) (Setq point4 (Elt collection 3)) // Modify points. (Setq point1.Y scrollBar1.Value) (Setq point2.X scrollBar2.Value) (Setq point3.Y scrollBar3.Value) (Setq point4.X scrollBar4.Value) // Modifying points doesn't modify old collection, so create new collection . (Setq collection (New PointCollection)) (collection.Add point1) (collection.Add point2) (collection.Add point3) (collection.Add point4) (Setq polygon.Points collection))) (Def (ScrollBarDemo) (ApplyXaml this "~/GuiDemo/ScrollBarDemo.xaml") (Setq ready TRUE) (Show)) )