2 Replies Latest reply on Mar 9, 2011 8:47 AM by paatfv10

    adding default property values to custom component tag

    paatfv10

      Hi,

      is it possible to set  default values to populate custom components' tag in source view when  the custom component is being drag and dropped from the design view? An  example of this would be the s:label component - when you drop it in  design view then go into the source code, you'll see that the text  property is already set to text="Label". How would this get done  for custom components? Primarily I'm trying to set default values to  properties such as dataProvider and skinClass.

       

      Thank you.

        • 1. Re: adding default property values to custom component tag
          Nuwan,Chamara Level 1

          Hi,

           

          I think you can use the Properties window in the design view for this purpose. Go to properties window in the design view and click on the category view icon and it will show all the properties which you can edit. Setting a value for the properties in there would result in adding that value in your source view.

          • 2. Re: adding default property values to custom component tag
            paatfv10 Level 1

            Hi,

            thanks for your reply,

            Unfortunately I think we're talking about two seperate things - You seem to be explaining how to set properties on components in design view (which will subsequently affect the properties in its mxml tags found in the source view), whereas I'm trying to find how to specify default values for a component (set somewhere in the source code of the component) so that when this component gets dragged/dropped from the design view, the predefined default values are shown instantaniously in the source view.

             

            An example of this is the s:textcomponent - when you drag it into your canvas in design view, the label property is already set.