LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Keeping Front Panel Position the same at runtime

Solved!
Go to solution

There has been some threads on here that say to set the Pane.Origin to 0,0 and that will set your front panel position to 0,0 every time you run.  I can't seem to get this to work.  I created a property node under GObject.Origin.  Then I tied a constant to the input and a constant to the reference.  I keep getting an error about the reference.  Any advise?  Maybe another way to do it?  I'm probably just doing something wrong.

 

What I am trying to accomplish is when I am developing on the front panel and moving things around, I want the front panel to always run from the same position when I go to runtime.  I have tons of buttons that border the edge of the bottom of the screen and so they get covered up if I don't set the front panel back perfectly.  I am not using the scroll bars and the title menu is completely gone.  All that the user sees is the front panel that I have created.

 

Thanks. 

0 Kudos
Message 1 of 7
(4,756 Views)
Solution
Accepted by topic author shoemakesmusic

I believe you need to obtain a reference to the pane starting from a "this VI" and working your way down the hierarchy, like this:

 

pane ref.png

This sets the origin on the first pane.  If you have more, you can put the last property node in an array and remove the index array node.

 

(edit: note that the second property on the VI PN is a typo)

 

 

This is a common thing to want to do at run time, but some of the other things you mention are a little suspect.  Why do you have "tons" of buttons off-edge?  There are a number of ways the user could accidentally see those despite your efforts to keep them hidden.  What function do they serve if they are GUI elements but excluded from the GUI? 

Message Edited by blawson on 04-21-2010 02:02 PM
-Barrett
CLD
Message 2 of 7
(4,752 Views)

hmmm...that came out wrong.  What I meant was I have a row of buttons at the bottom of the screen that the user DOES use. If I accidentally move the front panel, those buttons now appear off screen by a few pixels.  

 

Thanks for the help.  I am going to try it now and see if I can get this working.  

0 Kudos
Message 3 of 7
(4,740 Views)
Thanks man.  That did the trick!  Been wishing I could do this for a while.
0 Kudos
Message 4 of 7
(4,734 Views)

sorry I read you wrong on the controls.  

 

Incidentally, at the recent LabVIEW Developer Day here in North Carolina, my boss gave a talk on UI design and we gave away a number of in house utilities related to UI management.  One of them is a front panel & window sizer.  Check it out if you think it could be useful.

 

http://www.kdyautomation.com/devday.php check out the UI utilities llb.

 

vis are free & open, but 2009 only. 

-Barrett
CLD
Message 5 of 7
(4,724 Views)
Great! I will check it out.  Always looking for things to spice up the GUI.
0 Kudos
Message 6 of 7
(4,718 Views)
hmmm...only bad thing is I'm still running 8.6.1.  Can't open the examples.
0 Kudos
Message 7 of 7
(4,717 Views)