LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Legend colors with Lab Style graphs and legend.fp

In CVI 6.0 the legend.fp function panel (...samples\userint\custctrl\legend\legend.fp) fails to pick up the correct plot and background colors from the graph, when that graph is a Lab Style control.

I have been able to find lines in the legend.c file that check for "anchorStyle == CTRL_GRAPH". Simply adding CTRL_GRAPH_LS as a valid anchorStyle seems to fix the legend, but prevents plotting of the actual data. Not as simple as I hoped ...

Has anyone already updated legend.fp to work with Lab Style controls? Or knows what else needs to be altered?

Thanks in advance,
Ian
0 Kudos
Message 1 of 3
(3,256 Views)
Ian,

This legend fp that you are using is a very old example program that was finally obsoleted in CVI 7.0, when built-in legends were added to the graph control. Unfortunately for you, you're trying to use it in a version where it already does not work properly (for the newer lab style controls) and before you could use the standard graph legend. So your only choices are to either upgrade to a later version of CVI, or continue digging into the legend's source code to find out why it's refusing to plot.

Luis
0 Kudos
Message 2 of 3
(3,247 Views)
Thanks for the answer, Luis, -- it helps a lot because I'm just about to upgrade anyway. Problem solved!

--Ian
0 Kudos
Message 3 of 3
(3,240 Views)