ActionScript 2.0 Components Language Reference |
|
|
|
| DataGrid component > DataGrid.hScrollPolicy | |||
Flash Player 6 (6.0.79.0).
Flash MX Professional 2004.
myDataGrid.hScrollPolicy
Property; specifies whether the data grid has a horizontal scroll bar. This property can have the value "on", "off", or "auto". The default value is "off".
If hScrollPolicy is set to "off", columns scale proportionally to accommodate the finite width.
|
NOTE |
This differs from the List component, which cannot have |
The following example sets horizontal scroll policy to automatic, which means that the horizontal scroll bar appears if it's necessary to display all the content:
my_dg.setSize(150, 100);
// Add columns to grid and add data.
var myDP_array:Array = new Array();
myDP_array.push({name:"Clark", score:3135});
myDP_array.push({name:"Bruce", score:403});
myDP_array.push({name:"Peter", score:25});
my_dg.dataProvider = myDP_array;
my_dg.hScrollPolicy = "on";
|
|
|
|