ICS

QicsTable Documentation Set

Customizing Table Display Using Cell Display Objects

In the QicsTable architecture, individual cell contents are not drawn by the table widget, but rather by entities called cell display objects. A cell display object is responsible for not only the display of the cell, but also any edit operation that may occur in the cell. The cell display object works together with the QicsGrid object to accomplish these tasks.

A cell display object (also sometimes called a displayer), is a cell property. This means that there is a default displayer for the entire table, and that different displayers may be set on individual rows, columns, and cells. By setting different cell display objects on different cells, you can display data in many different ways.

Built-in Cell Display Classes

All cell display objects must inherit (directly or indirectly) from QicsCellDisplay, an abstract class that defines the API that every cell display object must implement. QicsCellDisplay is the base of the cell display object class hierarchy. Three subclasses of QicsCellDisplay provide additional support for various types of cell display objects. If you need to create an entirely new cell display object, you most likely should base your object from one of these three classes.

QicsTable provides several pre-defined cell display objects. These objects can be used as-is, or they can be subclassed to provide customized behavior.

Creating a New Cell Display Class

When none of the built-in cell display objects fit your requirements, you need to create your own displayer. As noted above, your new class must be derived from QicsCellDisplay or one of its subclasses. When you create your class, there are a number of class methods that must be implemented:

In addition, there are a number of methods that can be re-implemented in your subclass if you so desire.

All trademarks and copyrights on this page are properties of their respective owners.
The rest is copyright 1999-2006 Integrated Computer Solutions, Inc.