2 Replies Latest reply on Jul 20, 2009 8:14 AM by Zolotoj

    TitleWindow titlebar

    Zolotoj Level 3

      I am adding a slider to a titlebar as following:

       

      private var hs:HSlider;

      ......

      hs = new HSlider();
      hs.minimum  = 1;
      hs.maximum = 10;
      hs.width = 100;
      hs.height = 15;
      hs.tickInterval = 1;
      hs.snapInterval = 1;
      hs.allowTrackClick = true;
      hs.setStyle("fontSize", "8");
      hs.labels = [1,2,3,4,5,6,7,8,9,10];
      hs.setStyle("labelOffset", "-10");
      hs.addEventListener("change", setHistoryNumberOfYears)
      titleBar.addChild(hs);
      hs.value = 5;
      titleBar.validateNow();     
      

      It works fine. Then I am trying either to hide it or completely remove:

      Alert.show(String(titleBar.getChildIndex(hs)));
      titleBar.removeChildAt(4);
      titleBar.validateNow();
      

      Alert will show 4, but the slider is still staying there.

      Any idea what I might be doing wrong?

       

      Thanks