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

    Resizing controls with custom skin




      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">
                <s:State name="normal"/>
                <s:State name="disabled"/>
           <s:Group x="0" y="0">
                <s:Rect height="31" radiusX="5" width="182" x="0.5" y="0.5">
                          <s:SolidColorStroke caps="none" color="#000000" joints="miter" miterLimit="4" weight="1"/>
                          <s:SolidColor color="#FF90CD"/>
                <s:RichEditableText color="#2B4381" fontFamily="Arial" fontSize="12" tabStops="S0 S50 S100" x="11" y="11" width="161" heightInLines="1" id="textDisplay"/>


      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,