brent99 Posted June 28, 2005 Report Share Posted June 28, 2005 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: Quote Link to comment
m3nth Posted June 28, 2005 Report Share Posted June 28, 2005 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. Quote Link to comment
brent99 Posted June 30, 2005 Author Report Share Posted June 30, 2005 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. Quote Link to comment
Barrie Posted July 1, 2005 Report Share Posted July 1, 2005 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. 5175[/snapback] Brent: This little VI may help to further clarify things. http://forums.lavausergroup.org/index.php?...ype=post&id=913 Cheers! Barrie Quote Link to comment
Jim Kring Posted July 1, 2005 Report Share Posted July 1, 2005 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 Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.