Was able to figure it out. I set the width to a public function:
public function linkbutton_Width(isVisible:Boolean) :int { if(isVisible) { return 100; } else { return 0; } } and in my MXML declaration: width="{outerDocument. linkbutton_Width(this.visible)}" Thanks. angeLo ________________________________ From: Angelo Anolin <angelo_ano...@yahoo.com> To: flexcoders@yahoogroups.com Sent: Thu, 20 May, 2010 16:45:31 Subject: [flexcoders] Set Width of An Item Renderer Component Based on Visible Property of the Control Hi FlexCoders, I have declared an in-line item renderer in my datagrid: <mx:DataGridColumn headerText=" Test" textAlign="center" sortable="false"> <mx:itemRenderer> <mx:Component> <mx:HBox horizontalAlign= "center" > <mx:LinkButton id="lnk1" label="Link 1" visible={outerDocum ent.fncVisible( )}" width="{???} "/> <mx:LinkButton id="lnk1" label="Link 1" /> <mx:LinkButton id="lnk1" label="Link 1" /> </mx:HBox> </mx:Component> </mx:itemRenderer> </mx:DataGridColumn> as you may see, I am determining the visibility of the link button via a function. What I want to achieve is that if the linkbutton contrl is invisible, the width should be 0, but if it is visible, then width should be 100. How do I pass in a function for the width of the control whether it's visibility is set to true or false? Thanks.