LabWindows/CVI Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
RobertoBozzolo

Make SetCursorAttribute behave like SetAnnotationAttribute

Status: New

SetAnnotationAttribute permits you to pass -1 in AnnotationIndex parameter to apply the attribute to all annotations on the graph, while SetCursorAttribute does not. It would be good that this command too permits someway to operate on all cursors in a single pass.

 

As an example, when I want to print a graph on a black-and-white printer I prepare the control for this changing all elements to black. 

I can use a single instruction for annotations:

   SetAnnotationAttribute (panelHandle, PANEL_GRAPH, -1, ATTR_ANNOTATION_CAPTION_COLOR, VAL_BLACK);

 

On the other hand, I need to iterate on all elements for cursors

   GetCtrlAttribute (panelHandle, PANEL_GRAPH, ATTR_NUM_CURSORS, &numCursors);
   for (k = 1; k <= numCursors; k++) SetCursorAttribute (panelHandle, PANEL_GRAPH, k, ATTR_CURSOR_COLOR, VAL_BLACK);

 



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?