LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Tab control page change

Solved!
Go to solution

But guys as we say, if we find the solution for the answer eventually we end up finding another problem.

 

I have some buttons in each tab. I want to access these buttons with enter key. Like example, since I can change tabs with keys, ill go to second tab by pressing say '2' and FP tab will be changed to 2nd tab and then i press enter and when i press enter i want the button in the second tab to be activated or toggled. similarly then i go to 3rd tab and press enter to activate or toggle button in the third tab.  

I have been trying this but couldn't implement properly.  

 

Thanks and Regards

Baig

0 Kudos
Message 11 of 20
(125 Views)

Hi Baig,

 

then you need on more case structure, using the tab control value as selector input…

Best regards,
GerdW
CLAD expired, using LV2011SP1 + LV2017 (+LV2019 sometimes) on Win7+cRIO
Kudos are welcome Smiley Wink

0 Kudos
Message 12 of 20
(114 Views)

hi GerdW

can you please elaborate 

thanks and regards

0 Kudos
Message 13 of 20
(112 Views)

Work with the Key Down? event to see if you have the Enter key pressed.

When you do, use the current value of the tab selector to determine which tab page is open.

Use that to drive a case structure where you will determine which button is meant to be pressed.  If those buttons are associated with the event structure, you can wire a true to a Value (signalling) property node of that button.  That will queue up an event that the button was pressed just as if you had manually clicked on it.

0 Kudos
Message 14 of 20
(104 Views)

Hi mabaig,

 

tab will be changed to 2nd tab and then i press enter and when i press enter i want the button in the second tab to be activated or toggled. similarly then i go to 3rd tab and press enter to activate or toggle button in the third tab.

Wire the tab terminal to a case structure selector. In the cases you can send the "ENTER" action to any "button" you like to…

Best regards,
GerdW
CLAD expired, using LV2011SP1 + LV2017 (+LV2019 sometimes) on Win7+cRIO
Kudos are welcome Smiley Wink

0 Kudos
Message 15 of 20
(103 Views)

greetings 

I tried this and it worked .. well but not the way i needed. It isnt failing completely. In my VI, I have subvi that has global variable in it and I am monitoring this global variable in my main VI  FP as progress indicator. This is in the event structure (handled by value  change of a button) and then I did what you said, took the case structure and gave the enter key scan value to trigger that button then it does activate the event case always but the global variable is not getting updated(only showing final value when it is supposed to increase linearly). when i manually click button it is updating properly 

What should be the mechanical action of the button

Have any idea where its getting messed up with global veriable

NOTE: I am using Property Node value(signaling) to trigger event structure

NOTE: Global Variable is updating linearly only when I click the button then I press enter. For proper updating again I have to click manually otherwise pressing enter shows direct final value

 

Thanks and Regards

Baig

 

0 Kudos
Message 16 of 20
(83 Views)

Hi mabaig,

 

In my VI, I have subvi that has global variable in it

but the global variable is not getting updated

So you have some VIs and some bugs in those VIs. As soon as you attach them we will be able to debug with you - until then you need to debug on your own…

 

Why do you need a global variable, being a possible source of race conditions? Why not use a shift register in your main event handling loop to store the current tab page?

Best regards,
GerdW
CLAD expired, using LV2011SP1 + LV2017 (+LV2019 sometimes) on Win7+cRIO
Kudos are welcome Smiley Wink

0 Kudos
Message 17 of 20
(77 Views)

Hi GerdW 

 

So you have some VIs and some bugs in those VIs. As soon as you attach them we will be able to debug with you - until then you need to debug on your own…

Sure that would be great help but I couldn't attach now. I have the vi files in my office PC not the one I am using for forums. 

I am using two global  variables in this application. I am downloading some HEX data to a microcontroller so here, I needed to check handshake after each byte , and to monitor the activity I am using slider as a progress bar connected no number of iterations of the subvi loop where data is being downloading. 

Another Global variable I am using to update the total length of the selected Hex code from sub vi to main vi for max value of the progress bar(slider).

If you have any better suggestions it would be appriciated

 

thanks and Regards

Baig

 

0 Kudos
Message 18 of 20
(60 Views)

That description doesn't clarify where the tab control and all those buttons come into play.

 

So we can wait until you get back to the office PC to have access to the files you can upload to the forums.

0 Kudos
Message 19 of 20
(51 Views)

Hi

Its working fine. After placing these global variables, I actually needed to reinitialise them at the end so that in the next operation these global variable values could be change to appropriate code file length.

Thanks & Regards.

Baig

0 Kudos
Message 20 of 20
(34 Views)