1 Reply Latest reply on Jul 21, 2010 11:04 AM by p.z

    Resizing controls with custom skin

    p.z

      Hi,

       

      Can someone tell me how to make a spark control with a custom skin made in Catalyst to behave like a standard unskinned control when resized in design view of Flash Builder or during runtime? In other words I want it to behave like it's 9-sliced. For example, I've made a simple and ugly rounded skin for TextInput in Catalyst like this:

       

       

      <?xml version="1.0" encoding="utf-8"?>
      <s:Skin xmlns:s="library://ns.adobe.com/flex/spark" xmlns:fx="http://ns.adobe.com/mxml/2009">
           <fx:Metadata>[HostComponent("spark.components.TextInput")]</fx:Metadata>
           <s:states>
                <s:State name="normal"/>
                <s:State name="disabled"/>
           </s:states>
           <s:Group x="0" y="0">
                <s:Rect height="31" radiusX="5" width="182" x="0.5" y="0.5">
                     <s:stroke>
                          <s:SolidColorStroke caps="none" color="#000000" joints="miter" miterLimit="4" weight="1"/>
                     </s:stroke>
                     <s:fill>
                          <s:SolidColor color="#FF90CD"/>
                     </s:fill>
                </s:Rect>
                <s:RichEditableText color="#2B4381" fontFamily="Arial" fontSize="12" tabStops="S0 S50 S100" x="11" y="11" width="161" heightInLines="1" id="textDisplay"/>
           </s:Group>
      </s:Skin>
      

       

      How to do that in this example?

       

      I have searched everywhere on the net, and in a 1000 page book I have about Flash Builder and Flex and couldn't find even a single example. And I need this if I want to make something like resizable web form with a resize grip or resizable options panel.

       

      Thanks in advance,

      Petar