Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

How to change waveform plot background color from black to white

Does anyone know how to change the background color of waveformplots from black to white?  It's eating up a lot of print cartridges printing out all that black.
0 Kudos
Message 1 of 6
(5,273 Views)

You can do this via the PlotAreaColor property on the graph:

graph.PlotAreaColor = Color.White;

Also, if you have Measurement Studio 7.1 or later, you can right-click on the graph in the designer, click "Auto Format" in the context menu, and select a black and white format that will configure multiple settings that are ideal for black and white printing.

- Elton

Message 2 of 6
(5,267 Views)
Thanks Elton -
Stupid me.  I was looking at plot members instead of graph members.

Geoff
0 Kudos
Message 3 of 6
(5,261 Views)

I am trying to do the same sort of thing with a VB.NET project and MS 7, but i get an error every time I write something like the line posted above.  For instance:

graph.plots.items(1).linecolor = color. lime

I get an error saying system.drawing cannot be converted to System.UInt32. 

I'm pretty sure I'm just missing something obvious, but I still can't see it. 



Any ideas out there?
0 Kudos
Message 4 of 6
(5,257 Views)
Looks like you are using the ActiveX CwGraph and not the .NET graph

In that case, you would need

graph.Plots.Item(1).LineColor = Convert.ToUInt32(ColorTranslator.ToOle(Color.Aqua))
Bilal Durrani
NI
0 Kudos
Message 5 of 6
(5,250 Views)
It's amazing that you answered this just as I found that same line of code by googling system.drawing cannot be converted to system.Uint32 !!!

I had suspected I was mixing up the Active X and .NET components, but I wasn't sure how to get around this. 

Thanks for you fast reply!


0 Kudos
Message 6 of 6
(5,245 Views)