LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

strange appearance of numeric control

Solved!
Go to solution

Hi....

 

I encounter a strange appearance of a numeric control, see the two screen shots below.

 

Background: on a tabpanel, two attributes of several numeric controls are changed programmatically if I set a flag using a check box located on a different tab panel:

 

- the control mode is switched from indicator to hot

- the precision is changed from 6 to 4 digits to compensate for the space of the numeric arrows

 

These changes are applied to three controls, but only the first (top most) behaves unexpected, while the others are fine...

 

A) If both attributes are changed, the two upper controls look like this:

 

strange.jpg

 

that is, the left most characters of the upper control are somehow overlapping, giving the impression of a fat O.

 

B) If only the control mode of the upper control is changed to hot, the following result is obtained:

 

strange2.jpg

 

This makes it more obvious that somehow the two left zeros of the upper control are squeezed together.

 

Interestingly, if I operate the upper control by clicking on the up/down arrow, the resulting display (1.0000E-3) is ok.

 

I was very much afraid of posting this mystery which could well be a stupid error of mine, but being unable locating a problem in the code I thought it might possibly be related to the tab panel problem reported here

 

Comments, suggestions?

 

Thanks, Wolfgang

0 Kudos
Message 1 of 8
(4,106 Views)

I have prepared a stripped-down version showing at least problem B)

 

It does not show the extreme case of problem A, probably I have removed too much controls from the UI.

 

To reproduce the bug, run the program, check the check box, and switch to the left tabpanel. The upper numeric control will show squeezed zeros as displayed in the screen shot B in my previous post.

 

Wolfgang

 

0 Kudos
Message 2 of 8
(4,083 Views)

Hello Wolfgang,

 

when i was testing your project i was able to see part of the described behavior.

When the size of the control is increased it doenst happen at all.

So my guess is that is is related to scrolling a larger precision number in a control that is too small for the amount of caracters.

 

Can you increase the size of the Control a bit to fix this?

 

Regards

 

Moritz M.

0 Kudos
Message 3 of 8
(4,074 Views)

Hi Markus,

 

thanks for looking into it.

 

I have slightly modified the example which now even shows the more dramatic case A.

 

Concerning your reply: I disagree with your guess!

 

1a) The control is large enough, actually I am setting a precision of 4 to have the number short enough

1b) If a number is too long, the usual behavior of a control is that you see only part of the number (or text for string controls), while here digits overlap.

2) The control behaves properly if you change the order of the function calls, i.e. reverse the order of precision and control mode

3) The control behaves properly if no tabpanel switch is involved: if you put the checkbox on the same tabpanel as the numeric control, everything is fine. This is actually how I found out, because in my original code the checkmark was a menu item until I decided to change it.

 

So my guess is that the visual update sequence of the control/tabpanel is flawed.

 

Wolfgang

 

0 Kudos
Message 4 of 8
(4,055 Views)

upps, it should have read: Hi Moritz...

 

I am sorry

0 Kudos
Message 5 of 8
(4,046 Views)
Solution
Accepted by topic author Wolfgang

Hi Wolfgang,

 

I checked your project and it looks like a bug. I created a CAR. The number is 282946.

 

I guess for the moment you have to live with it or place the checkbox on the same Tab.

 

Cheers,

RMathews

Ramona Lombardo
Applications Engineer, NI Germany
Certified LabVIEW Developer
0 Kudos
Message 6 of 8
(4,035 Views)

Thanks a lot!

0 Kudos
Message 7 of 8
(4,033 Views)

If somebody else encountered this problem: it has been fixed in release 2010SP1 which makes me very happy:  it's difficult to explain why your GUI looks crippled... Smiley Very Happy

0 Kudos
Message 8 of 8
(3,815 Views)