Jump to content

Anyone know how to control the panel position for reentrant clones?


Recommended Posts

I have a VI that is reentrant. I save the real VI at coordinates X, Y. On the block diagram, I put an FP:Open method call.

When the clones run, they open up their FP, but the windows are staggered from the original VI position. I can see how this helps with debugging most reentrant panels, but in my case, I'm trying to put together a user interface where the clones all open stacked up on each other -- playing with transparency to fade windows in and out on top of each other.

Does anyone know of an easy way to say, "Hey, dumb clone, open your FP in the same place as your original"?

Link to comment

QUOTE (Aristos Queue @ Jul 8 2008, 07:48 PM)

Does anyone know of an easy way to say, "Hey, dumb clone, open your FP in the same place as your original"?

Just set the VI.FrontPanel.Position property prior to invoking FrontPanel.Open method within the VI. I think that if you don't do this, you'll always get the staggered behavior.

Link to comment

QUOTE (Aristos Queue @ Jul 9 2008, 04:48 AM)

I have a VI that is reentrant. I save the real VI at coordinates X, Y. On the block diagram, I put an FP:Open method call.

When the clones run, they open up their FP, but the windows are staggered from the original VI position. I can see how this helps with debugging most reentrant panels, but in my case, I'm trying to put together a user interface where the clones all open stacked up on each other -- playing with transparency to fade windows in and out on top of each other.

Does anyone know of an easy way to say, "Hey, dumb clone, open your FP in the same place as your original"?

I'm not sure this can help but I think that sometimes the "call chain" primitive gives you what you would expect from "current VI path" primitive. I think I saw that in LV 6 or 7 with vit.

Link to comment

QUOTE (Ton @ Jul 8 2008, 09:34 PM)

:oops: I think you're right Ton! I should've done a test first.

QUOTE (Antoine @ Jul 8 2008, 10:59 PM)

I'm not sure this can help but I think that sometimes the "call chain" primitive gives you what you would expect from "current VI path" primitive. I think I saw that in
LV
6 or 7 with vit.

If you're trying to use the call chain to get the reference to the current VI, you should use the VI Server Reference - 'ThisVI' constant from the Application Control Palette. It will work with re-entrant VI s to get the reference of the current instance (I use this a lot).

Link to comment
QUOTE (Jim Kring @ Jul 9 2008, 10:57 AM)
Now, there's your problem: Reentrant VI clones weren't designed to be used for user interfaces. You should be using VI Templates ;)
The irony here is that in this case, I'm wishing my clone was exactly like my original. I'm not looking for customization. :-)
Link to comment

SOLUTION!!! If you set the Window Run-time Position in the VI Properties dialog, the clones will all follow suit and appear in the set location.

Unfortunately, my really cool idea for using a stack of semi-transparent VIs won't work... I can't make the panel color itself transparent, so the stacked effect of the panel gray is enough to completely hide the furthest back window, even with the palest of transparency settings. A bit of research found that this is a limitation of the operating system until very recently (in Windows at least) and nothing in LV will let me set the panel to transparent. *sigh*

Link to comment

QUOTE (Aristos Queue @ Jul 10 2008, 07:07 AM)

SOLUTION!!! If you set the Window Run-time Position in the VI Properties dialog, the clones will all follow suit and appear in the set location.

You know using dialogs is generally considered cheating?

QUOTE

Unfortunately, my really cool idea for using a stack of semi-transparent VIs won't work... I can't make the panel color itself transparent, so the stacked effect of the panel gray is enough to completely hide the furthest back window, even with the palest of transparency settings. A bit of research found that this is a limitation of the operating system until very recently (in Windows at least) and nothing in
LV
will let me set the panel to transparent. *sigh*

So frontpanel transaparency only works one layer?

Ton

Link to comment

When you reply, the system quotes by default.

When you post two successive posts in a given timeframe, it concatenates them into a single post.

Result - I quote myself within my own post. I'll edit it so that it doesn't confuse others.

Link to comment

QUOTE (Yair @ Jul 11 2008, 11:58 AM)

When you reply, the system quotes by default.

When you post two successive posts in a given timeframe, it concatenates them into a single post.

Result - I quote myself within my own post. I'll edit it so that it doesn't confuse others.

Ah that makes sense. I did notice the concatenation "feature" before. That would of course be a perfect explanation, even if the result was slightly confusing....

Shane

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