trace("The cell at " + cell + " has gained focus");
};
grid.addEventListener("cellFocusIn", myListener);
Note: The grid must be editable for the above code to work.
DataGrid.cellFocusOut
Availability
Flash Player 6 (6.0 79.0).
Edition
Flash MX Professional 2004.
Usage
listenerObject = new Object();
listenerObject.cellFocusOut = function(eventObject){
// insert your code here
}
myDataGridInstance.addEventListener("cellFocusOut", listenerObject)
Description
Event; broadcast to all registered listeners whenever a user moves off a cell that has focus. You can
use the event object properties to isolate the cell that was left. This event is broadcast after the
event and before any subsequent
cellEdit
Version 2 components use a dispatcher/listener event model. When a DataGrid component
dispatches a
cellFocusOut
attached to a listener object that you create. You call the
it the name of the handler as a parameter.
When the event is triggered, it automatically passes an event object (
handler. Each event object has properties that contain information about the event. You can use
these properties to write code that handles the event. The
object has three additional properties:
columnIndex
A number that indicates the index of the target row. The first position is 0.
itemIndex
The string
type
For more information, see
Example
In the following example, a handler called
grid.addEventListener()
handler in the
cellFocusOut
broadcast, a
trace
var myListener = new Object();
myListener.cellFocusOut = function(event) {
var cell = "(" + event.columnIndex + ", " + event.itemIndex + ")";
264
Chapter 6: Components Dictionary
event, the event is handled by a function (also called a handler) that is
A number that indicates the index of the target column. The first position is 0.
.
"cellFocusOut"
"EventDispatcher class" on page
as the second parameter. The event object is captured by the
eventObject
statement is sent to the Output panel.
events are broadcast by the next cell.
cellFocusIn
addEventListener()
DataGrid.cellFocusOut
415.
is defined and passed to
myListener
parameter. When the
method and pass
) to the
eventObject
event's event
event is
cellFocusOut
Need help?
Do you have a question about the FLASH MX 2004-USING COMPONENTS and is the answer not in the manual?
Questions and answers