Jump to content

control the position in depth(bring forward,backward,to front, to back)


Recommended Posts

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

Link to comment

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...

Link to comment

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...

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.