LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

refresh graph

Using Labwindows/CVI 8.1.0 on Windows XP.

I have a "virtual o'scope" graph display on a panel, and a parameters setup panel that, among other things, allows me to set the background color for the graph.

After returning from the setup panel I call :

 

    // Set the scope BG color.
    SetCtrlAttribute(iHandle_VOscope,VSCOPE_SCREEN,ATTR_PLOT_BGCOLOR,(int)G_VOscopeSetup.item[OSCOPEBGCOLOR].nvalue);

 

and then

    status = DisplayPanel (iHandle_VOscopeSetup);

 

to refresh the screen.

 

The problem is that the background color on the graph doesn't change unless I close the window and reopen it. I've also called

        RefreshGraph (iHandle_VOscope, VSCOPE_SCREEN);

after setting the background color, and that doesn't work either.

Any suggestions would be appreciated.

 

0 Kudos
Message 1 of 4
(3,286 Views)

Hi,

 

Did you try ProcessDrawEvents?

 

RefreshGraph isn't expected to work here because it only redraws plots.

0 Kudos
Message 2 of 4
(3,282 Views)

Nope, ProcessDrawEvents doesn't do it either. The funny thing is that if I put a breakpoint in after the set-parameters panel exits (I hit the "Done" button, and it calls the SetCtrlAttribute function) it redraws the background.

0 Kudos
Message 3 of 4
(3,278 Views)

(banging head softly against wall, so as to not damage the plaster)

When I closed the setup panel, I was saving the new settings from the panel to the common structure (where the main panel could find them) _after_ I refreshed the main panel. Amazing what happens when you do things in the right order.

0 Kudos
Message 4 of 4
(3,268 Views)