On 4/13/05, Paul Frantz <[EMAIL PROTECTED]> wrote:
> <mx:DataGrid width="100%">
> <mx:columns>
> <mx:Array>
> <mx:DataGridColumn headerText="25%"
> width="{app.width * .25}"/>
> <mx:DataGridColumn headerText="50%"
> width="{app.width * .50}"/>
> <mx:DataGridColumn headerText="25%"
> width="{app.width * .25}"/>
> </mx:Array>
> </mx:columns>
> </mx:DataGrid>
For some reason your DataGrid overrides the widths specified by you.
To get around this, set up a resize handler and reset the widths in
doLater():
function setColumnSizes():Void
{
datagrid.getColumnAt(0).width = app.width * 25 / 100;
datagrid.getColumnAt(1).width = app.width * 50 / 100;
datagrid.getColumnAt(2).width = app.width * 25 / 100;
}
<mx:DataGrid width="100%" id="datagrid"
resize="doLater(setColumnSizes)">
setColumnSizes() is called on the next frame after the DataGrid is resized.
--
[EMAIL PROTECTED]
http://manish.revise.org/
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/