LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I programmatically move a control or indicator from one tab control page to a different tab control page?

As far as I know, this is not possible

If there is a method,let's hear it

0 Kudos
Message 2 of 11
(5,425 Views)
I don't think you can do it either, but I'd like to know why you want to do this.

Message Edited by Dennis Knutson on 10-11-2006 07:45 AM

0 Kudos
Message 3 of 11
(5,421 Views)
Why do you want to do this?  There are workarounds for certain reasons you might want an indicator/control on more than one tab, but we need to know why you want to do this in order to offer a solution.

Far as I know, devchander is right.  I've never heard of a way to do this.
0 Kudos
Message 4 of 11
(5,415 Views)
If I could do this it would simplify the development of my application.  I have a fairly large application that is used to perfom various radiated field measurements in an anechoic chamber that includes motion control of two seperate axes in addition to GPIB control of the instrumentation used to perform the measurements.  You can measure the pattern of an antenna, the radiated power from a wireless device, perform sensitivity measurements  of a wireless receiver, etc.  I am currently using tab control with several pages for each test.  When selecting between the various tests I hide pages that are not needed for the selected test.  Some of the pages are common to all the test while others are only used for a given test.  There are some controls and indicators that are commonly used on different test (i.e. an indicator that displays the current position of an axis, or controls whic specify the desired test positions for a test run, etc.).  I know I can create seperate controls and indicators for each test control tab, this is what I am doing now.  But, I realized that many times these controls/indicators are on a hidden page for one test and not used, yet an equivalent control is needed on the selected test.  All of these test are run using an event loop structure that is common to all the test with dynamic event registration for various test.  Many times I am creating equivalent controls for different test.  I realized that I could simplify much of this if I could programmatically move a control or indicator from one tab page to another as a test is selected.  This would also help to reduce memory requirements as new test are added to the program, reduce the overall number of controls and indicators in the program, and simplify the dynamic event registration.   I was hoping to find a property on the property node for the control/indicator to move it from one tab page to the other.  You can programatically move the position of the control/indicator, but apparently you can not move it from one page to another page.   

0 Kudos
Message 5 of 11
(5,407 Views)
Did you know that you can have a single control appear on multiple tabs and that you don't hve to duplicate it? If you have a control and move it onto a tab page with the keyboard arrow controls, it is not actually part of the tab but appears above it. There is an outline that appears around the control when you do this but that disappears when the VI is run. You could then use a property node to set the control's visibility for those tabs you don't want the control to appear on.
Message 6 of 11
(5,403 Views)
If your underlying program architecture is an event-driven state machine, this problem becomes very easy to "solve."  You put a control on both tab controls and then use the same task to handle the events of each.  Having two or more controls/menu items do the same thing is standard UI practice, and the event-driven state machine makes it easy.  You can find a lot of info on how this works on these forums.  I have attached an NI-Week tutorial ( LV7.1, 7.0 also available) for your convenience.

Alternately, as mentioned above, you can have a floating control that does not belong to either of the tabs.  You can use tab change events to show and hide the control so it does not cause problems for the tab cases it is not used in.

Finally, you can put it outside the tab control so it is always visible.

Your choice will depend on what you are actually trying to accomplish.
0 Kudos
Message 7 of 11
(5,368 Views)

Realizing this is an old post, I have come across it twice in trying to find help on a similar question:

I recently had luck moving the control/indicator outside the entire tab structure onto the labview background, activating the new tab and then moving the control/indicator to the new tab.

 

0 Kudos
Message 8 of 11
(4,480 Views)

Scurran,

 

Yes.  But that works if you want to move a control between tabs while you are developing.

 

The original poster's question was how to do it programmatically while the VI is running.

0 Kudos
Message 9 of 11
(4,448 Views)

Hello,

 

18 years later I would like to know if there is a solution for this problem, because I had the same Idea.

 

More precise I would like to move a Listbox from one page to the other on the same place. Of course your could just place another Listbox with the same content but, I thought it would be cleaner if there is only one.

 

0 Kudos
Message 10 of 11
(456 Views)