01-26-2011 12:14 PM
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:
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:
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
Solved! Go to Solution.
01-27-2011 08:33 AM
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
01-27-2011 11:36 AM
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.
01-28-2011 12:51 AM
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
01-28-2011 03:31 AM
upps, it should have read: Hi Moritz...
I am sorry
01-28-2011 07:44 AM
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
01-28-2011 07:53 AM
Thanks a lot!
08-05-2011 12:23 PM
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...