![]() | Type | Description | ||
| Item as Variant | A long expression that indicates the item's handle being painted | |||
| ColIndex as Variant | A long expression that indicates the column's index or cell's handle, or a string expression that indicates the column's caption | |||
| IOwnerDrawHandler | An object that implements the IOwnerDrawHandler interface |
Use the CellOwnerDraw property to paint yourself the cell. The CellOwnerDraw property specifies whether the user is responsible for painting the cell. By default, the CellOwnerDraw property is nothing, and so the control does the painting. Using the notification interfaces is faster than using events. For instance, let's say that we need cells where for some values we need to get displayed other things. Use the Def(exCellOwneDraw) property to assign an owner draw object for the entire column.
The following VB sample displays the CellValue when it is different than 5, and displays another string when the CellValue property is 5: