LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Scaling legend on progress bar

I have two identical PCs with LabWindows/CVI 7.0 and TestStand 3.0 installed. When I run my program on one machine, the progress bar legend goes 0, 10, 20, 30, 40, .... On the other machine, however the progress bar legend goes 0, 20, 40, .... How can I make the progress bar appear the same on both machines?
0 Kudos
Message 1 of 6
(3,587 Views)

Hello hurst,

I wasn't able to reproduce the behavior on my systems.  Is there any difference between screen resolution or any other setting on the two machines?  Also which OS are you running on?  You could also take a look at the code for the progress bar.  It is open source and is located in <cvi install dir>\toolslib\toolbox\toolbox.c.  In particular, the code used to display the tick marks is simply a SetCtrlAttribute on a numeric slide control.  So this behavior shouldn't change on different machines.

Thanks.

Wendy L
LabWindows/CVI Developer Newsletter
0 Kudos
Message 2 of 6
(3,571 Views)

Both of the systems have exactly the same hardware, screen resolution is 1600x1200 on both systems, I am running win2k on both systems.

My desktop system, which is different hardware also runs win2k, 1600x1200 screen resolution and the progress bar scaling is '0, 10, 20, 30, ....

It is very difficult to explain to a customer why two identically configured systems behave differently.

Hurst C.

0 Kudos
Message 3 of 6
(3,565 Views)
Hello Hurst,
 
That kind of behavior usually occurs when the size of the numeric horizontal slide control (which is used to create the progress dialog) is changed.  You can verify this behavior by placing a numeric horizontal slide control on a panel, then modifying the range to be from 0 to 100.  After that  resize the control so that the markers shown are 0, 10, 20...  Now if you make the width of the control a little bit smaller, after some threshold, the markers shown are going to change to 0, 20, 40...  The tick marks shown are always going to be evenly spaced according to the width of the control.  Therefore, the numeric labels shown are going to change dependent on the range you specify for the control and its width.
 
So, I assume that the control is getting slightly resized between the two machines.  I would check the panel attribute settings to make sure you have disabled the option to "Scale Contents On Resize".  You also want to set the "Resolution Adjustment" to 0%.  These options can be found on the Edit Panel dialog under Other Attributes.
 
Let me know if that helps the situation.  Also, if you create a panel with a numeric horizontal slide control from 0 to 100, create an executable and run it on both machines, do you see a change in the way the major ticks are labeled?  This will allows us to isolate whether this issue is caused by a setting or a problem with the horizontal slide/progress dialog.
 
Thanks.
Wendy L
LabWindows/CVI Developer Newsletter
0 Kudos
Message 4 of 6
(3,546 Views)
Wendy,
 
I indirectly did what you suggested but in a different manner.
 
First of all. The progress bar does NOT change from what is specified in the UIR file, and 'Scale contents on resize' is NOT checked
 
Second. From the UIR file I measured the width of the progress bar on my screen to be 2.75 inches. I then twiddled the width of the progress bar until the scaling went from 0, 10, 20, 30, ... to 0, 20, 40, 60, .... I measured the width of the progress bar to be 2.5 inches and then discarded the changes to the UIR file. This exercise would seem to indicate that my progress bar width is NOT close to the transition point.
 
Thirdly. My company purchased these systems from another company who installed CVI 7.0 on these machines. We install TestStand and additional test software on these machines before passing them on to our customer. Is there any setting in CVI that can modify the behaviour to cause the progress bar label scaling changes?
 
Hurst C.
0 Kudos
Message 5 of 6
(3,538 Views)

Hello Hurst,

Outside the settings we've previously looked at (Resolution Adjustment and Scale Contents on Resize), there isn't any other settings in CVI that will make a horizontal slide resize on different machines.  Well if you create an executable using a horizontal slide then programmatically return the width of the control, does the width returned differ on your machine and on the customer machine?  Also, are you able to reproduce the problem on any other development machine other than your customer's machine?

Then, another step I would take is to modify the toolbox.c file and add a line in the CreateProgressDialog function to programmatically return the width of the control used to generate the progress dialog.  Does this width change on your machine and on the customer's machine?

Thanks.

Wendy L
LabWindows/CVI Developer Newsletter
0 Kudos
Message 6 of 6
(3,515 Views)