I am trying to override a Button class, i have a few properties which i wish directly initialise with the mxml description of the component, like :
<sl:TMyButton id="btnX" x="168" y="223" width="290" label="Button" myproperty1="10" myproperty2="101" myproperty3="4"/>
which function is triggered ( in order to override it ) when all properties with mxml description is fully initialised with their values ?
Flex components have 4 methods in
protectednamespace which should be overridden to solve different tasks:createChildren()— calls one time to create and add subcomponents.measure()called in process of lay outing to calculate components size.updateDisplayList()has real component unscaled width and height as parameter. It is obvious this method is convenient for positioning of children.commitProperties()is the method I suggest you to override in order to apply properties values which don’t need component size to apply.So in your case it can be
updateDisplayList()orcommitProperties(). I recommend you the following code snippets:Hope this helps!