User Guide
DataGrid.columnStretch 281
Example
The following example displays the column name in the Output panel when the title is
clicked. With a DataGrid instance named
my_dg on the Stage, paste the following code in the
first frame of the main timeline:
my_dg.setSize(200, 100);
my_dg.columnNames = ["Name", "Description", "Price"];
var dgListener:Object = new Object();
dgListener.headerRelease = function (evt_obj:Object) {
trace("You clicked on the \"" + my_dg.columnNames[evt_obj.columnIndex] +
"\" column.");
}
my_dg.addEventListener("headerRelease", dgListener);
DataGrid.columnStretch
Availability
Flash Player 6 (6.0.79.0).
Edition
Flash MX Professional 2004.
Usage
listenerObject = new Object();
listenerObject.columnStretch = function(eventObject){
// Insert your code here.
}
myDataGridInstance.addEventListener("columnStretch", listenerObject)
Description
Event; broadcast to all registered listeners when a user resizes a column horizontally.
Version 2 components use a dispatcher/listener event model. When a DataGrid component
dispatches a
columnStretch event, the event is handled by a function (also called a handler)
that is attached to a listener object (
listenerObject) that you create. You call the
addEventListener() method and pass it the name of the handler as a parameter.