LabVIEW Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
0 Kudos
t.hoshi

Programmatically obtaining control references of controls inside tab controls

Status: Declined
Functionality already in LabVIEW

Currently, if a control is inside a tab control, the reference of it cannot be obtained programmatically through property nodes as the Controls[] property only outputs control references of controls directly placed on the front panel.

 

The Controls[] property should be able to output ALL the references of controls on the front panel including ones inside tab controls.

 

My customer wishes for the above functionality as he wants to change the value of a control inside a tab by specifying a control by its label programmatically.

 

Please refer to attached VI for details.

 

I am sure there are other applications where this functionality is useful and it would be great if the Controls[] property is able to output all the references of controls on the front panel.

 

Taiki Hoshi

AE NI Japan

6 Comments
Technico
Member

QUOTE

"if a control is inside a tab control, the reference of it cannot be obtained programmatically through property nodes as the Controls[] property only outputs control references of controls directly placed on the front panel"

 

You can get the reference to controls on the tab control through property nodes by getting the references to the tab-"Pages" and then get "Controls on Page[]"

 

tst
Knight of NI Knight of NI
Knight of NI

Current LV versions also ship with vi.lib\Utility\traverseref.llb\TRef Get All FP References.vi which will parse through the controls in tabs as well.


___________________
Try to take over the world!
t.hoshi
NI Employee (retired)

Sorry, didn't know about that... I guess this idea is not needed since it is already implemented.

 

Thanks a lot Technico and tst!

G-Money
NI Employee (retired)
Status changed to: Declined
Functionality already in LabVIEW
iannicholson
Member

I had a need for this and came across this idea. After some further looking, I noticed that the MGI Library (http://mooregoodideas.com/mgi-library/) has a function that does this readily, called MGI Get VI Control Ref[].vi. The Include Tab Page Controls? input defaults to True, so there is no need to set it to perform this function.

Todd_Lesher
Active Participant

For reference, the MGI vi uses "Pages" and "CtlsOnPage" - the way Technico mentions above.