LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Common control on multiple tabs

I'm probably missing something simple, but I have three tabs on a panel and would like to have a control that is common to all of them.  The answer seems simple; basically the control would be placed on the panel and moved over the tab pages; which is what a similar issue in the labview fourm suggested.  However, I can not get the control to appear on top of the tab..... it seems the tab pages have the priority no matter what I try with the z-plane options.  Like I say, am I missing something obvious?

Thanks
0 Kudos
Message 1 of 8
(4,408 Views)

Hello,

tab pages have indeed priority. You should create the control on the first tab page and then simply copy it to the other pages. I'm afraid there is no other way to solve your problem. You could of course copy the control programatically instead of in the uir file.

0 Kudos
Message 2 of 8
(4,402 Views)
Hi gtoph,

Controls (objects) that you place in a tab control belong to the one and only page you place the control on.  These controls are not "global" to the tab control.

If the control is only used in a few pages, you could simply copy that control over to each tab page you need it in. Another method is to simply place the control in the actual user interface panel above, below, etc the actual tab control. This would make the control global.

I would also recommend making a product suggestion at www.ni.com >> Contact NI >> Product Feedback.

Hope this helps!

Best Regards,
Jonathan N.
National Instruments
0 Kudos
Message 3 of 8
(4,376 Views)
Hi Jonathan,

The second method is the one I tried before I posted a message, seemed like it should have worked.... I placed a control on the actual panel, but I was unable to move it above the tab control.  As the previous post suggest, it looks like a tab control has z-plane priority no matter what.

If I copied the control to each tab page I would have to get the appropriate tab panel handle for each copyed control correct?  (which is why I was trying to use a common control 🙂 )
0 Kudos
Message 4 of 8
(4,350 Views)
Howdy gtoph,

When I mentioned that the global button appears above the control, I didn't mean in terms of the z-axis. I meant above the tab in terms of the y-axis (see attachment). This is going to be your option if you don't want to have a button on each page.

Send in a product suggestion if you like as it goes to our R&D department.

Best Regards,
Jonathan N.
National Instruments
0 Kudos
Message 5 of 8
(4,345 Views)
Sorry, misunderstood you.  🙂

That's how I currently have it implemented.   Thanks for you help.
0 Kudos
Message 6 of 8
(4,341 Views)
Hi gtoph,

Tab controls are implemented using child panels (one child panel for each tab) and unfortunately that carries with it the limitation that the tab control (and all the controls within it) must appear above all other controls in the parent panel. You can only affect the z-plane order of a tab control relative to other tab controls in the same parent panel.

This situation is similar to ActiveX controls that have their own windows. They have the same z-plane limitation as tab controls.

Luis
0 Kudos
Message 7 of 8
(4,256 Views)
Just to stick in my 2 cents: You can put your command button on a separate panel that you load as a child panel of the main panel. Position the button at (0,0) on this panel, make the child panel have a 'Hidden' frame style, and make its dimensions exactly the same size as the command button. At run time, position the child panel at the correct point on the main panel (above the tab control) and - I think you can only do this at run time - make the title bar for it invisible.
 
At this point the child panel is completely invisible, and all you see is the command button floating above the tab control.
 
 
--
Martin
Certified CVI Developer
0 Kudos
Message 8 of 8
(4,237 Views)