LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Tabbing into an XControl

So...I've got an XControl with several buttons on it.  I'd really like for these buttons to be tabbed through just like any other button on the main GUI.  But...there doesn't seem to be a way to do this.  Any suggestions?

 

Thanks!

-Carl

-Carl
CLA/CTA
0 Kudos
Message 1 of 7
(3,213 Views)

Hi Carl,

 

In the Facade of the XControl, you can drop a tab control and this should work. You could put the buttons you want in tabs. Please elaborate on how this is not working for you. 

Vivek Nath
National Instruments
Applications Engineer

Machine Vision
0 Kudos
Message 2 of 7
(3,181 Views)

Thanks for the response Vivek, but that's not what I'm trying to do -- let me elaborate!

 

Typically when you press the "tab" button on the keyboard, the focus changes from control to control (based on the tabbing order). If I have an X-control in my GUI, when I tab through my controls and get to the X-control, the entire X-control gains focus.  There does not seem to be a way to tab through the individual controls within the X-control.

 

Ideas?

 

 

-Carl
CLA/CTA
0 Kudos
Message 3 of 7
(3,166 Views)
Thanks for clarifying your question for me. Unfortunately, there is no way to currently tab through the controls in an Xcontrol on the front panel. A Corrective Action Request has been filed for the R&D department to look into including this functionality. Hope this is not too much of an inconvenience.
Vivek Nath
National Instruments
Applications Engineer

Machine Vision
0 Kudos
Message 4 of 7
(3,148 Views)

I'm trying to do just this.  Has any progress been made since this issue was raised four and half years ago?

0 Kudos
Message 5 of 7
(2,608 Views)

I looked up the corrective action request that you mentioned. I believe that I found it. The description on the CAR says "[The VI] makes use of an xcontrol that appears to the end-user to be separate, discrete controls.  However, when tabbing, it doesn't behave that way.  In this dialog, I can't tab from the OK, Cancel, Help buttons to the individual elements of the xcontrol."

 

It appears that, because this is a low-priority issue, it has not been approached by our developers. The message on the CAR says "We are rejecting this CAR because it is low severity. We realize that addressing this CAR may still have value, but we believe the ROI is likely to be lower than other efforts we will instead pursue."

 

I can understand that it must be frustrating when issues like these are not resolved and a solution for this would help your individual project. However, in order to provide all our users with the highest quality of software in general, it is important for us to prioritize our corrective action requests in order to identify areas with the highest level of impact.

 

Take care,

Jeremy P.

Applications Engineer
National Instruments
0 Kudos
Message 6 of 7
(2,588 Views)

I actually came up with a workaround for this.

 

Within the xControl facade, I created a VI key up event.  This works because key focus is transferred on the tab down, and by the time the tab up happens, the facade VI has key focus.  Within the event, if the key is an ASCII tab with no shift, assign key focus to the first control; ASCII tab with shift, assign key focus to the last.

 

I also added the ability to tab out of the xControl.  If a tab is keyed down on the last control, I look at the xControl container state ctl refnum's owning vi, get the list of controls on its front panel, (secret: they are returned in tabbing order), figure out which control comes after the xcontrol, and assign key focus to it.  Something similar happens for shift-tabbing on the first control.

 

I realize that this must sound like an apaling hack, but it has produced the intended functionality so far.

Message 7 of 7
(2,559 Views)