LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

CVI 9 bug? - graph control on resized panel

I have a graph control on a panel that has 'scale contents on resize' set.

 

  • If I load the panel and resize it BEFORE displaying it, the y-axis name disappears.
  • If I load the panel and resize it AFTER displaying it, the y-axis name stays visible.

 

Of course, I don't really want to display the panel then have the user see me resizing it. 

 

See screenshot below, that was generated from the attached test project. This appears to be a new and interesting feature of CVI 9; anyone from NI care to comment?

 

GraphTest

--
Martin
Certified CVI Developer
0 Kudos
Message 1 of 7
(4,211 Views)

Hello Martin,

 

Thank you for taking the time of attaching a project that reproduces the problem. This made our job of investigating this a lot easier.

 

Yes, this is a previously unknown bug in 9.0. There will be a CVI release shortly with a fix. In the meanwhile, I can give you the following workaround:

 

After resizing the panel, but before displaying it, add the following code:

 

    SetCtrlAttribute (panelHandle, PANEL_GRAPH, ATTR_FIXED_PLOT_AREA, 1);
    SetCtrlAttribute (panelHandle, PANEL_GRAPH, ATTR_FIXED_PLOT_AREA, 0);

 

This code should have no discernible effect, other than making sure that the y-axis name is visible once you display the panel.

 

I'm really sorry for the inconvenience.

 

Luis

 

Message 2 of 7
(4,194 Views)

Luis:

 

Nice try, but unfortunately the workaround doesn't work here  :smileysad:

--
Martin
Certified CVI Developer
0 Kudos
Message 3 of 7
(4,176 Views)

Hello Martin,

 

I'm sorry to hear that. I had tested it in the attached sample project and it worked, and I had expected that it would work in general.

 

So in your real program, does the graph still not show the y-axis name, even with the workaround? If so, then there might be something else about this problem that I'm not completely understanding, which is a bit unsettling.

 

If you're so inclined, you have the option to submit your real program to our ftp site which would allow me to investigate why the workaround isn't working, and potentially come up with a better one.

 

Luis

0 Kudos
Message 4 of 7
(4,156 Views)

Hello again,

 

Please ignore my last post. I think I know what the problem is. I had tested the workaround with the version of the CVI runtime that I have installed, which I now realize might not be the same that you have, particularly if you installed CVI via the Fourth Quarter 2008 Developer Suite. If that's the case, then the version of the CVI runtime that you have needs to be patched so that the workaround that I gave you will work (you should be receiving a more official notification concerning this sometime in the next week or two).

 

You can patch the CVI runtime by running the installer from here. This will also automatically patch any distributions that you might build on the same PC.

 

Luis
0 Kudos
Message 5 of 7
(4,136 Views)

Luis:

 

OK, it works with CVI runtime 9.0.0.348, but not with 9.0.0.330.

--
Martin
Certified CVI Developer
0 Kudos
Message 6 of 7
(4,123 Views)
Yes - only difference is that the text ALWAYS appears on the screen correctly, it just does not print.  Same issue when compiled under 5.0.1
0 Kudos
Message 7 of 7
(3,967 Views)