LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to move the origin of the front panel to the top left corner?

I'd like to move the origin to the top left corner of the front panel programmatically but currently I have no idea how to do it.

 

Pls note that I'm aware of the scroll to origin at runtime method, but thats not what I'm looking for as it only has an effect during runtime. Once the VI stops the origin returns to its original position, but I'd like it to be permanent like if I resize the window from a program it keeps its size after the program stops, or if I change the position of an FP object it stays there after the code stopped.

 

The closest thing I have found is to check the ContentRectangle property of the pane. That seems to show how much the origin is off of the top left corner, but this is a read only property, so I cant change it.

 

Thanks.

0 Kudos
Message 1 of 23
(2,325 Views)

Hi 1984,

 

there's a property of the panel/pane to set its origin, just call that!

 

(There are also QuickDrop shortcuts, items in the Tools menu, right-click items, … possible. You will find them ready-to-use in the forum.)

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 23
(2,303 Views)

Speaking of the QD plugin, here's a snippet of it so you can see how to find the property.


GCentral
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
0 Kudos
Message 3 of 23
(2,288 Views)

By setting the origin property I can indeed move the origin to the top left corner, but that only has an effect during runtime. 

 

Ctrl + space + o : has a permanent effect which is good, but if inside it just sets the origin and if I do it during runtime then it doesnt keep the origin there once the VI stopped.

0 Kudos
Message 4 of 23
(2,277 Views)

@1984 wrote:

By setting the origin property I can indeed move the origin to the top left corner, but that only has an effect during runtime. 

 

Ctrl + space + o : has a permanent effect which is good, but if inside it just sets the origin and if I do it during runtime then it doesnt keep the origin there once the VI stopped.


Of course! You need to save the VI afterwards to make these changes persistent.

Rolf Kalbermatter
My Blog
0 Kudos
Message 5 of 23
(2,251 Views)

Turn the scrollbars off ('always off', right click the scrollbar), then press QD, CTRL+O.

 

Now the origin will be fixed (unchangeable).

0 Kudos
Message 6 of 23
(2,242 Views)

Place the attached file under C:\ ... \LabVIEW 20xx\project\ ...

It will then be available under your Tools menu (the next time you start LabVIEW).

When you select menu -> Tools -> ... Reset VI Origin to 0, it will reset the origin of the topmost VI (I use this tool a lot).

 

Note: That VI is set to "Run when opened" (which is needed for the tool to work properly)

"If you weren't supposed to push it, it wouldn't be a button."
0 Kudos
Message 7 of 23
(2,188 Views)

@paul_cardinale wrote:

When you select menu -> Tools -> ... Reset VI Origin to 0, it will reset the origin of the topmost VI (I use this tool a lot).


Isn't that what QD, CTRL+O does?

0 Kudos
Message 8 of 23
(2,156 Views)

Hi wiebe,

 


wiebe@CARYA wrote:

@paul_cardinale wrote:

When you select menu -> Tools -> ... Reset VI Origin to 0, it will reset the origin of the topmost VI (I use this tool a lot).


Isn't that what QD, CTRL+O does?


Usually yes, but only for most recent LabVIEW versions…

(Tried to do the same on LV2011? That's why I also stick with the tools menu item…)

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 9 of 23
(2,150 Views)

@GerdW wrote:

Hi wiebe,

 


wiebe@CARYA wrote:

@paul_cardinale wrote:

When you select menu -> Tools -> ... Reset VI Origin to 0, it will reset the origin of the topmost VI (I use this tool a lot).


Isn't that what QD, CTRL+O does?


Usually yes, but only for most recent LabVIEW versions…

(Tried to do the same on LV2011? That's why I also stick with the tools menu item…)


If you go further back, then you won't have panes at all...

 

If you go even further back, you won't even have property nodes.

0 Kudos
Message 10 of 23
(2,146 Views)