I have the following code:

 

<?xml version="1.0" encoding="utf-8"?>

<mx:HBox xmlns:mx="http://www.adobe.com/2006/mxml"; height="18"
width="100%">

            <mx:Image id="imageControl" source="{this.source}"
height="18" width="18"/>

            <mx:Label id="labelControl" text="{this.label}"/>

            

            <mx:Script>

                        <![CDATA[

                                    

                                    private var imageSource:Object;

                                                                        

                                    [Bindable]

                                    //[Inspectable(category="Common",
type="String", environment="Flash")]

                                    [Inspectable(category="General",
defaultValue="", format="File")]

                                    public function get source():Object

                                    {

                                                return imageSource;

                                    }

                                    

                                    //[Inspectable(category="Common",
type="String", environment="Flash")]

                                    [Inspectable(category="General",
defaultValue="", format="File")]

                                    public function set
source(value:Object):void

                                    {

                                                imageSource = value;

                                    }

                                    

                        ]]>

            </mx:Script>

</mx:HBox>

 

 

Because my image and label controls are data bound to properties, in the
designer the text just appears as "{this.label}" as opposed to the
actual value. How can I write it so when I change the label property for
the HBox, it changes it for the label sub-control?

(Essentially I just want a HBox control with an image and a label)

 

Also - how can I add properties to the standard properties tab in Flex
Builder? I can use the Inspectable tab to show up on the detailed
properties tab, but I want it on the standard tab too!

 

Thanks,

 

Mark Ingram

 

 

 

Reply via email to