1 Reply Latest reply on Jul 10, 2010 11:50 AM by Shongrunden

    VScrollBar's track sizing

    demkalkov

      Hi, everyone!

      I've got a skin for VScroll bar and everything is just fine but track. I cant make it to resize when the list hight changes.

       

      Here is my track skin:

       

      <?xml version="1.0" encoding="utf-8"?>
      <s:SparkSkin xmlns:s="library://ns.adobe.com/flex/spark" 
                     xmlns:fx="http://ns.adobe.com/mxml/2009"
                     alpha.disabled="0.5"
                     height="100%">          
      
           <s:states>
                <s:State name="up"/>
                <s:State name="over"/>
                <s:State name="down"/>
                <s:State name="disabled"/>
           </s:states>
           
           <!-- border/fill -->
           <s:Rect top="0" bottom="0" left="0" right="0"     
                     minWidth="11" height="242">
                <s:stroke>
                     <s:SolidColorStroke color="#808080" weight="1"/>
                </s:stroke>
                <s:fill>
                     <s:SolidColor color="#BFBFBF"/>
                </s:fill>
           </s:Rect>
           
           <!-- shadow -->
           <s:Rect left="1" top="1" bottom="1" width="1">
                <s:fill>
                     <s:SolidColor color="0x000000" alpha="0.24" />
                </s:fill>
           </s:Rect>
           <s:Rect left="2" top="1" bottom="1" width="1">
                <s:fill>
                     <s:SolidColor color="0x000000" alpha="0.12" />
                </s:fill>
           </s:Rect>
           <s:Rect left="2" right="1" top="1" height="2">
                <s:fill>
                     <s:SolidColor color="0x000000" alpha="0.12" />
                </s:fill>
           </s:Rect>
           <s:Rect left="2" right="1" bottom="1" height="3">
                <s:fill>
                     <s:SolidColor color="0x000000" alpha="0.12" />
                </s:fill>
           </s:Rect>
           
      </s:SparkSkin>