From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

key control of the time control

What I really like about the time control that it is so easy to set using the arrow keys on my keyboard. Unfortunately this doesn't seem to work with the minutes and seconds. Anyone have an explanation for this? Using 7.1 on XP.
------------------------------------------------------------------------------------
Seriously concerned about the Labview subscription model
Message 1 of 14
(3,575 Views)
Don't know about you, but for me (also 7.1 XP) a time stamp control works fine. Left and right clicks move between the different fields (including minutes and seconds) and up and down change the value (likewise).

___________________
Try to take over the world!
Message 2 of 14
(3,566 Views)
It happens when you set the increment of the time stamp to something big. Strange...
I had the increment set to 900 to make the control make 15 minute steps when using the increment control, but then the key control doesn't seem to function properly anymore.

------------------------------------------------------------------------------------
Seriously concerned about the Labview subscription model
Message 3 of 14
(3,554 Views)

This doesn't happen only with the time stamp control, but with regular numeric controls as well.

I would describe it like this - The up and down keys always increment or decrement by one, regardless of the number you set for incrementing. I would call it a bug and I think that if you set the incrementing to 15, then the seconds should increase by 15 when you change the seconds value using the up key. The reason it doesn't change now is because you only add 1 and it rounds it back down. If you coerce up, you will see that you can increment.

Message Edited by tst on 09-05-2005 04:11 PM


___________________
Try to take over the world!
Message 4 of 14
(3,552 Views)
Correction - this doesn't happen with regular numeric control. I thought it did, because I had the cursor at the end of the number. The difference in the time stamp control is that it selects the entire field. I would still call this a bug.
 
And you should note that this also happens when you try to use the control's increment\decrement buttons.

Message Edited by tst on 09-05-2005 04:20 PM


___________________
Try to take over the world!
Message 5 of 14
(3,548 Views)
It gets worse: the same happens when you manually enter a value, even when it is a totally valid entry. If I type "10" in the minutes field, it no longer changes using the arrows. Then I use the arrow keys to go to the hours field; only this one can still be changed with the arrow keys, but when you do, the typed entry (10 minutes) disappears!
This behaviour works as follows: only a "higher" field can still be changed with the arrows after a manual entry. Doing so overrides the manual entry. The order is as follows: time overrides date fields and fields "to the left" override fields to the right. Date/ time formatting does not change this.

------------------------------------------------------------------------------------
Seriously concerned about the Labview subscription model
Message 6 of 14
(3,524 Views)

I agree, definitely worse. The control should remember the fact that you modified the fields and not overwrite wat you do. I think this is even more of a "real bug" than the other one. To report this as a bug, select the email option here.


___________________
Try to take over the world!
0 Kudos
Message 7 of 14
(3,522 Views)
I learned some more: as you all know a "value change" event in most controls fires after editing when pressing enter or clicking outside of the control. The same is the case when typing inside the time control.
But using the arrow keys in the time control is another animal: every key press fires a "value change" event. This explaines some of the odd behaviour: when you manually enter a value, the control is in edit mode. The entered value will only stick when you invoke the "value change" event. Because the edit mode the arrow key value change event cannot operate. Why it cannot operate in all "lower" fields is strange to me. Since every field can be changed independently inside one control, every field can invoke the value change event invoked by the arrow keys. When invoked in a "higher" field, it will override the edit mode in a lower field. After all, you cannot edit multiple fields at once.

------------------------------------------------------------------------------------
Seriously concerned about the Labview subscription model
0 Kudos
Message 8 of 14
(3,507 Views)
There is no way that I know of to read the edited value before it is "entered" by a value change event. That is unfortunate. I think it would be useful to invoke the value change when using the arrows to move from field to field inside the control (after an edit). That would solve the problem.
------------------------------------------------------------------------------------
Seriously concerned about the Labview subscription model
0 Kudos
Message 9 of 14
(3,506 Views)
I settled the issue by setting the keyfocus back to the control after pressing enter. So after manually entering a value one has to press enter, but the focus will stay on the control.
------------------------------------------------------------------------------------
Seriously concerned about the Labview subscription model
0 Kudos
Message 10 of 14
(3,506 Views)