I had the same problem too -
 
If you also set "minWidth" as well as "width", this should solve your
problem.  Well, at least, it did for me - 
 
Please let me know if this fixes your problem.
 
Mike

________________________________

From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of Pan Troglodytes
Sent: Tuesday, December 19, 2006 11:37 AM
To: flexcoders
Subject: [flexcoders] bug: creationpolicy=all screws up grid column
widths


In the following code, there are two tab navigators with two pages of
grid each.  All the grids are coded identically.  They each have two
columns, the first of which has a fixed width of 50 and the second with
no fixed width.  The bug is that when you click on the second tab on the
first tab navigator, the grid does not obey the width setting for the
first column.  In the second tab navigator, it does.  The difference is
that the first has creationPolicy=all. 

<?xml version="1.0" encoding="utf-8"?> 
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml";> 
  <mx:TabNavigator width="300" height="200" creationPolicy="all">
    <mx:Canvas label="Tab1">
      <mx:DataGrid width="100%" height="100%"> 
        <mx:columns>      
          <mx:DataGridColumn headerText="Name" width="50"
dataField="name"/>
          <mx:DataGridColumn headerText="Value" dataField="value"/> 
        </mx:columns> 
      </mx:DataGrid>
    </mx:Canvas>
    <mx:Canvas label="Tab2">             
      <mx:DataGrid width="100%" height="100%"> 
        <mx:columns>      
          <mx:DataGridColumn headerText="Name" width="50"
dataField="name"/> 
          <mx:DataGridColumn headerText="Value" dataField="value"/> 
        </mx:columns>
      </mx:DataGrid>
    </mx:Canvas>
  </mx:TabNavigator>
  <mx:TabNavigator width="300" height="299"> 
    <mx:Canvas label="Tab1">
      <mx:DataGrid width="100%" height="100%"> 
        <mx:columns>      
          <mx:DataGridColumn headerText="Name" width="50"
dataField="name"/> 
          <mx:DataGridColumn headerText="Value" dataField="value"/> 
        </mx:columns>
      </mx:DataGrid>
    </mx:Canvas>
    <mx:Canvas label="Tab2">             
      <mx:DataGrid width="100%" height="100%"> 
        <mx:columns>       
          <mx:DataGridColumn headerText="Name" width="50"
dataField="name"/> 
          <mx:DataGridColumn headerText="Value" dataField="value"/> 
        </mx:columns>
      </mx:DataGrid>
    </mx:Canvas>
  </mx:TabNavigator>
</mx:Application> 


-- 
Jason  

Reply via email to