Jump to content

How to keep front panel from moving?


Recommended Posts

I often go through the pain of having to "recenter" my objects on the front panel from having the window scroll "out of bounds" from an interaction with a background control or other random reasons.

Is this just part of the burden of labview or am I missing a good trick here? It seems needlessly painful to have to recenter your controls. Other design tools, like VB, don't have that "endless landscape" issue.

Does labview need some "revert" function to recenter your front panel automatically? :headbang:

Link to comment

On the Block Diagram Select...

Functions > Application Control > Property Node

Place the property node anywhere that's convenient

On the property node > Right Click > Select Class > VI Server > VI

From the property node, select Front Panel Window > Origin

Right Click > Change All To Write (or Change to Write... there's only one property so it doesn't matter)

Right Click > Create > Constant

This will recenter the front panel and set the origin to (0,0) every time the program runs. The (0,0) location of the front panel is noted by a diamond when the layout grid is displayed. The attached screenshot shows the VI before it runs... after it runs only the lower right half of the diamond is displayed so it looks like a triangle in the upper left corner of the panel once the program goes back to edit mode and shows the layout grid.

Also, there are other (easier) ways to get the front panel property node when there's other code already on your block diagram, but that will get you there from scratch.

post-360-1119989127.jpg?width=400

Link to comment
I often go through the pain of having to "recenter" my objects on the front panel from having the window scroll "out of bounds" from an interaction with a background control or other random reasons.

Is this just part of the burden of labview or am I missing a good trick here?  It seems needlessly painful to have to recenter your controls.  Other design tools, like VB, don't have that "endless landscape" issue.

Does labview need some "revert" function to recenter your front panel automatically?  :headbang:

5155[/snapback]

Ah, "origin"! Good one, and in Labview 7.1 they even put origin gridlines up for you. Thanks for the tip, should make life a bit saner.

Link to comment
I often go through the pain of having to "recenter" my objects on the front panel from having the window scroll "out of bounds" from an interaction with a background control or other random reasons.

Is this just part of the burden of labview or am I missing a good trick here?  It seems needlessly painful to have to recenter your controls.  Other design tools, like VB, don't have that "endless landscape" issue.

Does labview need some "revert" function to recenter your front panel automatically?  :headbang:

5155[/snapback]

There is an OpenG VI called "Fit VI window to Largest Dec" which will do just what it says. Put a frame decoration onto your Front Panel, where you want the panel extents to be when the VI runs. The rest is automated.

You can get this VI in the Application Control (appcontrol) library which is available for download using OpenG Commander.

Best of luck,

-Jim

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.