![]() |
Annotations








Public Data Item |
Declared in: NiGraph.h |
Declaration
CNiAnnotations Annotations;
Description
Gets a collection of annotation objects associated with the control.
Note that you must initialize a CNiAnnotation object from an existing object. For example:
CNiAnnotation annotation = graph.Annotations.Add(); annotation.Name = _T("Annotation01"); annotation.Visible = true;
Or:
CNiAnnotation annotation = graph.Annotations.Item(1); annotation.Name = _T("Annotation01"); annotation.Visible = true;
If you do not initialize a CNiAnnotation object from an existing object, a CNiObjectNotInUsableState exception will be thrown when you attempt to manipulate the instance of the CNiAnnotation. For example:
CNiAnnotation annotation;// This will throw a CNiObjectNotInUsableState exception because // the CNiAnnotation object was not initialized from an existing // object. annotation.Name = _T("Annotation01");