08-02-2019 07:11 AM
Even I have one question
I am calling subvi for input (it is purely for UI purpose) in the main vi, here what happens is subvi is called properly but then I have to click on the String control to type the input. I wanted to type the input as soon as sub vi appears with needing to click the control
thanks and regards
Baig
Solved! Go to Solution.
08-02-2019 07:30 AM - edited 08-02-2019 07:31 AM
I moved your message to a new thread because what you are asking has nothing to do with the thread posted into. (Close SubVI Front Panel)
What you are asking for, you just need to set the focus onto the control.
08-03-2019 01:18 AM - edited 08-03-2019 01:19 AM
HI RavensFAn
yes that is right but what I needed is when I have more than one control and I want each after typing enter of it to get key focused one after the other in an order
08-03-2019 04:50 AM
LabVIEW has default behaviour to skip between controls using Tab. You can disable this behaviour for the controls you don't care about via their property pages.
Does that help you?
If you want to do it with the Enter key, you might need to use an Event Structure, the property node that RavensFan showed, and an array of references or statically coded references to each control in order (via the previous control's Value Change event, for example).
A simple example avoiding that is below:
Here all of the events can be handled in one case, which prevents frustrating code duplication. For this to work, you'd need the preference/option in which hitting Enter completes text input to be true (I think that's the default when you install LabVIEW, and from your question, I'd guess it's true for your installation).
08-03-2019 06:42 AM
ThankYou so much it worked perfectly
08-03-2019 10:38 AM
@mabaig wrote:
HI RavensFan
yes that is right but what I needed is when I have more than one control and I want each after typing enter of it to get key focused one after the other in an order
Now you are adding a new requirement that you didn't mention in your original post.
All you asked for was how to get a particular control to have focus.
You can't complain the message didn't answer your question when you proceed to add on a new requirement.
08-06-2019 03:59 AM
Hi RavenFan
Yeah my bad... I am sorry for not being precise but I really appreciate yours response and it has for no doubt helped me.
get to you guys when i stuck anywhere again and I now know where to come for help 😉
thanks and regards
Baig