Describes guidelines and conventions for implementing ISpreadsheetItemProvider, including information about properties and methods. The SpreadsheetItem control pattern is used to expose the properties of a cell in a spreadsheet or other grid-based document.
The SpreadsheetItem control pattern is closely related to the GridItem control pattern; controls that implement the SpreadsheetItem control pattern should also implement the GridItem control pattern. Controls can also implement the TableItem control pattern, if appropriate. For examples of controls that implement these control patterns, see Control Types and Their Supported Control Patterns.
This topic contains the following sections.
- Implementation Guidelines and Conventions
- Required Members for ISpreadsheetItemProvider
- Related topics
When implementing the SpreadsheetItem control pattern, note the following guidelines and conventions:
- When implementing the ISpreadsheetItemProvider::GetAnnotationObjects and ISpreadsheetItemProvider::GetAnnotationTypes methods, please refer to the IAnnotationProvider documentation. These methods both return arrays to enable providers to support multiple annotations on a single cell.
- Some kinds of annotations do not require a full implementation of the IAnnotationProvider interface. For example, a simple spelling-error indicator could be represented by having GetAnnotationTypes return a text attribute identifier of AnnotationType_SpellingError, and having GetAnnotationObjects return a null value.
The following properties and methods are required for implementing the ISpreadsheetItemProvider interface.
|Required members||Member type||Notes|
|Formula||Property||Implementing a separate Formula property is necessary because a cell’s Value property typically returns the computed value of the cell. The Formula property should be NULL if no formula is set.|
|GetAnnotationObjects||Method||Returns an array of element providers that refer to the annotations linked to this cell. Pointers within the array can be null if an annotation does not have a linked provider.|
|GetAnnotationTypes||Method||Returns an array of annotation type identifiers that describe the annotations on this cell. The array must be the same size as the array returned by GetAnnotationObjects.|
This control pattern has no associated events.
- Control Types and Their Supported Control Patterns
- Spreadsheet Control Pattern
- UI Automation Control Patterns Overview
- UI Automation Tree Overview