For simple text editing of cell values, an application need only provide simple beginEditCallback and endEditCallback handlers. In some advanced applications, simple text editing of a cell might not be sufficient. In these situations, the application can specify an edit policy in the callData of the beginEditCallback.
The edit policy defines the type of widget to be used for editing and some other edit semantics. The default edit policy is EwTextEditPolicy set up to use a single-line CwText as the edit widget. The application can substitute a more appropriate edit policy. For example, if the cell contains a day of the week, the application might wish to use an EwComboBoxEditPolicy. Applications can define custom edit policies by subclassing EwEditPolicy as required. The supplied subclasses of EwEditPolicy serve as good examples of this.
The following edit policies are provided in the Extended Widgets subsystem:
Note: | The EwTextEditPolicy and EwComboBoxEditPolicy cancel an edit operation when the ESC key is pressed. When an edit operation is cancelled, the endEditCallback is activated using the item's old value as the edited value. |