Jonathan Borduas Posted December 14, 2010 Report Share Posted December 14, 2010 Hi, I'm trying to programmatically control the position in depth(move to back, to front) of a tab control. I found these methods : http://decibel.ni.com/content/docs/DOC-12527 (attached) But it seems they are only good with panels (I'm not very familiar with it) So I did a test using the Vi's panel reference: I have this error: LabVIEW: This property is writable only when the VI is in edit mode, or this method is available only when the VI is in edit mode. Ok,so they are not very useful... Help would be greatly appreciated ! Jonathan Panel Move Forward and Backward Methods.vi Quote Link to comment
Francois Normandin Posted December 14, 2010 Report Share Posted December 14, 2010 Hi Jonathan, These methods work with any control or indicator in a panel. They act on the selected controls and indicators, so you have to first select them manually or programmatically (using the Selected? property) and them use the "Move Selection to ..." methods on the panel reference of these controls/indicators. As for the use at edit time, these methods can be useful if you program some editing help scripts such as those used with Right-Click Framework, QuickDrop or the items under the Tools menu... Quote Link to comment
Jonathan Borduas Posted December 14, 2010 Author Report Share Posted December 14, 2010 Ok, thank you for the info But is there a method that control the depth of a control while running the Vi ? Jonathan Quote Link to comment
Francois Normandin Posted December 14, 2010 Report Share Posted December 14, 2010 Ok, thank you for the info But is there a method that control the depth of a control while running the Vi ? Jonathan I don't think so. Actually, I think there was a discussion lately started by AQ about transparency problems for SubPanels... and it turned out that the way to work around the problem was to load upload the subpanels to bring the one you wished in the forefront in the top subpanel container. Applying this train of thought to your tabs problem, you could make each of your tabs a separate VI that gets loaded into a subpanel. Let's say you have "n" tabs. Create "n" subpanels and arrange them as you wish with transparent backgrounds. Load tab1 in subpanel1, tab2 in subpanel 2 and so forth. When you wish tab2 to be moved in front of tab1, unload tabs 1& 2 from subpanels 1&2 and reload them as tab1 in subpanel2 and tab2 in subpanel1. Voilà. Seems tricky at first, but I think it's not too difficult. I'm only concerned about the flickering of front panel while you do so. I'd recommend to defer panel updates while you make a swap. Let us know if this works or if you find something else... Quote Link to comment
Jonathan Borduas Posted December 14, 2010 Author Report Share Posted December 14, 2010 Wow, it's much more complexe than it should be ! (NI plz...) But I will try Jonathan Do you have an exemple, or something that could help me start ?! Quote Link to comment
Jonathan Borduas Posted December 14, 2010 Author Report Share Posted December 14, 2010 Also, is there a way to load the same VI in 2 subpanel (VI instance ?) Quote Link to comment
Francois Normandin Posted December 14, 2010 Report Share Posted December 14, 2010 Make your VIs reentrant and it should work. Call them by VI server with x8 for the options argument. I'm sure the z-position of a control could be something that is included in the RTE some day. Check on the LabVIEW Idea Exchange. If it's not there, then maybe you can propose it (for LV2012... ) Quote Link to comment
Jonathan Borduas Posted December 14, 2010 Author Report Share Posted December 14, 2010 Well I need this for january So I'm just going to try it this way. Also... It interesting to use subpanel... I see a lot more of possibilities... Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.