Jump to content

Programmatically controlling "origin" of front panel


Recommended Posts

I've done several searches and didn't find an answer (probably because I don't know the right words in LabVIEW parlance). And this problem seems so basic, someone has to have answered it before.

I have a main GUI front panel that has a section that is relevant for the user at run time plus a number of off-screen indicators used while debugging the code. The problem I'm having is that during development, the front panel gets scrolled at time to the debugging indicators. What I want is that during my initialization code (if I detect App.Kind to be Run Time System) to "rescroll" the front panel to what the user expects, not my debugging indicators.

In my searches, I've seen stuff about FP.Origin (deprecated in 8.x). I think that is what I was looking for. Any pointers to relevant examples or docs to solve my problem?

Link to comment

QUOTE (Matthew Zaleski @ Jan 26 2009, 10:40 PM)

I've done several searches and didn't find an answer (probably because I don't know the right words in LabVIEW parlance). And this problem seems so basic, someone has to have answered it before.

I have a main GUI front panel that has a section that is relevant for the user at run time plus a number of off-screen indicators used while debugging the code. The problem I'm having is that during development, the front panel gets scrolled at time to the debugging indicators. What I want is that during my initialization code (if I detect App.Kind to be Run Time System) to "rescroll" the front panel to what the user expects, not my debugging indicators.

In my searches, I've seen stuff about FP.Origin (deprecated in 8.x). I think that is what I was looking for. Any pointers to relevant examples or docs to solve my problem?

Hi,

I'm not really sure in which version FP.Origin "disappeared", I think LV 8.. but if you open in LV 8+ a VI who had this property it will work. So you need to find an "old VI" that was using it ; I use it so I know it still works in LV 8.6 but you can't even fin it if you activate scripting.

Tomorrow I can post a VI with it from work if nobody does it before ;)

Link to comment

QUOTE (Phillip Brooks @ Jan 27 2009, 01:10 PM)

LabVIEW 8.x does not support the Front Panel Window:Origin property in the VI class. If you use thisproperty in LabVIEW 8.x, the property applies only to the upper-leftmost pane. Use the Origin propertyin the Pane class instead.

Thanks for bringing that to my attention :o

Link to comment

I recommend taking a look at the "Fit VI Window To Largest Decoration.vi" Found in the OpenG Tools under the Application Control Tools. This VI works great for keeping the run size and position the same. You simply put a Frame Decoration (or any decoration that you like) around the area that you would like to be viewed when running. When the VI is called (typically I use it as my first VI in my startup) it will reposition the VI Window to show only the contents of the decoration regardless of where the front panel was last saved.

Link to comment

QUOTE (Dave Graybeal @ Jan 27 2009, 07:56 AM)

I recommend taking a look at the "Fit VI Window To Largest Decoration.vi" Found in the OpenG Tools under the Application Control Tools.

:thumbup: Totally! Quick note about those tools: put them as the first subVI in your VI - they look a little slow in the dev environment, but the resize happens really quickly when built into an exe.

Link to comment

QUOTE (Dave Graybeal @ Jan 27 2009, 01:56 PM)

I recommend taking a look at the "Fit VI Window To Largest Decoration.vi" Found in the OpenG Tools under the Application Control Tools. This VI works great for keeping the run size and position the same. You simply put a Frame Decoration (or any decoration that you like) around the area that you would like to be viewed when running. When the VI is called (typically I use it as my first VI in my startup) it will reposition the VI Window to show only the contents of the decoration regardless of where the front panel was last saved.

Be aware this only works on single pane VIs!

Ton

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.