LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Keyboard manipulation of Digital Control

When a Digital Control has the Key Focus active (see G Programming Reference
Manual page 22-8), the user can increase or decrease individual digits using
the up
and down arrow keys, and choose the digit by the right and left arrows. The
digit
selected, is the one on the left of the cursor shown inside the control.

When the number crosses zero down to negative numbers, the number shifts
one
place to the right to make room for the negative sign. Now if the up arrow
key is
pressed and the value crosses zero back to positive values, the increament
is now 10
times larger, since the cursor now points to a digit one place to the left.

When using such a control around zero values, this problem is very annoying.


Is th
ere any solution available (e.g. adding a plus sign, to keep the number
in
place)?

Thanks.
0 Kudos
Message 1 of 12
(4,102 Views)
Yes, very odd!

It is even worse if you continue pressing the down arrow once the number is
negative. For example, starting at zero with insert point to the left of the
decimal point:

up---> 1.00
down---> 0.00
down---> -1.00
down ---> -11.00
down ---> -111.00
down ---> -1111.00
up---> 8889.00
.....

weird. Doesn't seem to matter if it is right or left aligned.

Christian

"Eyal Sapir" wrote in message
news:38843724@newsgroups.ni.com...
>
>
> When a Digital Control has the Key Focus active (see G Programming
Reference
> Manual page 22-8), the user can increase or decrease individual digits
using
> the up
> and down arrow keys, and choose the digit by the right and left arrows.
The
> digit
> selected, is the one on the l
eft of the cursor shown inside the control.
>
> When the number crosses zero down to negative numbers, the number shifts
> one
> place to the right to make room for the negative sign. Now if the up arrow
> key is
> pressed and the value crosses zero back to positive values, the increament
> is now 10
> times larger, since the cursor now points to a digit one place to the
left.
>
> When using such a control around zero values, this problem is very
annoying.
>
>
> Is there any solution available (e.g. adding a plus sign, to keep the
number
> in
> place)?
>
> Thanks.
>
0 Kudos
Message 2 of 12
(4,102 Views)
I'm using Labview 6.0 and the issue seems to be somewhat different. Every time the size of the digital control shifts (whether adding a negative sign or some more numbers) the cursor location moves around.

Does anyone know any fixes or work arounds?
0 Kudos
Message 3 of 12
(4,102 Views)
Another data point. I have seen this in past versions. I tried it on ver 6.1 and it seems to work. I don't know of any workarounds.
0 Kudos
Message 4 of 12
(4,102 Views)
Sorry, I'm a little confused here. Does that mean that the issue is fixed in 6.1 (cursor position doesn't move around at all when changing the numbers with the arrow key)?

I just talked with Tech support and she said it's not fixed in 6.0 or 6.1, but it has been fixed in some, but not all, of the 7.0beta versions. She mentioned that it's not fixed in the latest 7.0beta.

One potential area to look for work arounds work around would be to use the property nodes to determine which control is being modified or focused on, and the keyboard.llb to intercept the arrow key strokes as they come in. However, this seems like it's quite a hack, and could become very cumbersome and expensive for a large number of variables.
0 Kudos
Message 5 of 12
(4,102 Views)
I am running LabVIEW 6.1 on a WIN 2000 Profesional machine. I still don't see it. If you want to post a small example program showing it, I could run it.
0 Kudos
Message 6 of 12
(4,102 Views)
There really is no example. Here is what I see:

Create a numberic control.
Enter the value 0.05
Place the cursor to the right of the 5
Press the down arrow on the keyboard --> 0.04
Press down arrow --> 0.03

We are decrememnting by 0.01, which is good. Continue.

Press keyboard down arrow --> 0.02
down arrow --> 0.01
down arrow --> 0.00
down arrow --> -0.01
down arrow --> -0.11
down arrow --> -0.21

Ahhhhhhhh. We were decrementing by 0.01 until we crossed zero, and now we are decrementing by 0.1. This is actually quite a mess for the interface of the VI I currently have. It looks like the reason for this is because the cursor moves over to make room for the - sign. There are similar strange effects at the other
positions, but the cursor usually does this moving over behavior.

Please let me know if you see this behavior, because I would happily upgrade to get rid of this problem.

Thanks,
Casey
0 Kudos
Message 7 of 12
(4,102 Views)
What I did is I tabbed over until the control is in focus (VI must be running) or double clicking until it is all black. In this mode it appears to work properly. Creating a navigation key will highlight it also.
0 Kudos
Message 8 of 12
(4,102 Views)
Interesting. In LV 6.0 running on Win2k it still exhibits the same behavior I described above. I guess my next thing to try is to upgrade to 6.1.

It is interesting though, that the Labview tech support people have this bug on record, and they show that it is not fixed in 6.0 or 6.1 or some 7.0beta versions. Weird.

It also doesn't sound like there are any work arounds until I get a new version of Labview.

Thanks,
Casey
0 Kudos
Message 9 of 12
(4,102 Views)
Maybe they are talking about if you click once on the control. Here is the VI I used with some notes on the front panel. It is saved in 6.0 format.
0 Kudos
Message 10 of 12
(4,102 Views)