0 Replies Latest reply on Dec 15, 2009 3:52 PM by Rothrock

    Custom Component and the Component Inspector

    Rothrock Level 5

      I'm making a custom component of a "highligher" that will put various highlight boxes around parts of my stage. Sometimes I want and ellipse and others a rectangle with rounded corners.

       

      I've figured out how to use the [Inspectable] tag in my class definition to make the various properties show up in the component inspector.

       

      But my question is how can I make certain properties only show up (or be active) based upon the result of a different property.

       

      For example they can select the type: ellipse or rect. If they select rect they will need to specify if the value of the corner radius (if any) but that value doesn't mean anything if they select ellipse. So I would like the cornerRadius value to either not show up or be dimmed. Is there any way to do this?