LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Position Element in top left of Front Pannel

Solved!
Go to solution

I have an array of elements that I want to position beginning at the top left of a user's screen when they begin the vi. Right now, I'm using this property node:

 

Capture.PNG

 

However, depending on how the screen is set up at the time, I can get something like this:

 

Capture2.PNG

 

How can I make sure that either A) the array is always in the top left corner of the user's view or B) Lock the user's view so that [0,0] is always in the top left corner?

 

Long term, I'm going to be using this as a sub-panel in a larger vi, so whichever method would work with that best would be my preference.

0 Kudos
Message 1 of 7
(4,889 Views)

See that little dot there at the crossing of the grid lines.  That is 0,0 of the front panel grid.  If you want that point to be in the top left corner of the VI, you need to set the pane origin to 0,0.  Create a property node, right click it and select Link->Pane.  Change it to Write mode and create a [0,0] cluster constant.

Capture.PNG

aputman
Message 2 of 7
(4,879 Views)
Solution
Accepted by topic author ATE-EGNE

You need to set the origin on the panel.



There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 3 of 7
(4,876 Views)

I should add that if you have splitters on your front panel, you'll have multiple options for linking the property node.  If you have your panels named properly, it's easy to link to the correct one.

Untitled.png

aputman
Message 4 of 7
(4,862 Views)

Sweet! thanks I'll keep that in mind in the future

0 Kudos
Message 5 of 7
(4,834 Views)

@crossrulz wrote:

You need to set the origin on the panel.


Thanks! Why the Index element value?

0 Kudos
Message 6 of 7
(4,831 Views)

@ATE-EGNE wrote:

@crossrulz wrote:

You need to set the origin on the panel.


Thanks! Why the Index element value?


Because of what I said above about multiple panels.  There is no need for getting the panes array if you link the property node to a specific panel.  

aputman
Message 7 of 7
(4,828 Views)