explorers' club

explorations in dev, science, sci-fi, games, and other fun stuff!

tip: Flex DataGridColumn + PercentWidth = easy as pie

1 Comment

Stumbled upon this today.  How easy is this?  Easy as pie!

<mx:DataGrid width="100%" height="100%">
 <mx:columns>
 <mx:DataGridColumn headerText="Name" dataField="name" width=".25" />
 <mx:DataGridColumn headerText="Age" dataField="age" width=".15" />
 <mx:DataGridColumn headerText="Job" dataField="job" width=".35" />
 <mx:DataGridColumn headerText="Height" dataField="height" width=".25" />
 </mx:columns>
</mx:DataGrid

original source – link

Advertisements

One thought on “tip: Flex DataGridColumn + PercentWidth = easy as pie

  1. Just be careful that all values sum to 1. Otherwise you get bizarre behavior.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s