LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to get the front panel scroll's position vallue

i want to get the front panel scroll's position value to dynamically control the control on the front panel ,but no anyway did i can get the information of the scroll bar,i am worried!!!
0 Kudos
Message 1 of 5
(5,711 Views)
Use the FP.Origin property (open a reference to the VI and then wire it to a property node and select the Front Panel Origin property).

Here's what help says about it:

"Front Panel Window:Origin Property
Property of VI.

The two elements in the cluster are the vertical and horizontal coordinates of the front panel interior portion that is in the upper-left corner. You can use these coordinates to scroll the front panel. These are in window local coordinates, that is, the numbers refer to the coordinates within an open window. As the scroll bars of the front panel move, the coordinates returned by this property change. If you load the VI in a subpanel control, this property is read only."
Message 2 of 5
(5,711 Views)
thank you! Mads!!
0 Kudos
Message 3 of 5
(5,711 Views)

Jumping forward 13 years, and I'm attempting to do the same thing but the FP.Origin property doesn't seem to exist in a VI Property Node that I can find.  I did find FP.WinBounds which doesn't seem to control where the GUI objects and FP Origin are relative to the window, but rather where the window is on the display screen.  The other one is FP.PanelBounds which has members Left, Top, Right, Bottom.  I used that to set Top and Left 0 and Right and Bottom to the sizes appropriate for my display resolution.  I thought that should put the FP Origin to 0 without having to use scroll bars manually.  Also, if you use the VI reference to make a VI property node, then select the Panel property and use that reference to make a Panel property node, then there is another "Position" with Left, Top members.  No dice.  Finally, I went ahead and made a VI property node and used the FP.Resizable to true, then mucked around with all these properties, and then later in the flow set FP.Resizeable back to False... and no luck.  Basically, if I use the scroll bars during edit mode to move the FP GUI around, say move the origin down and right 50 pixels... then I can't seem to get it to programmatically move back the Origin to window 0,0.  Anyone know how to do this in modern days (LV2017, 13 years past this original post's answer)?

0 Kudos
Message 4 of 5
(4,610 Views)

The origin is now set on a per front panel pane basis:

Pane Origin.png

Thanks for your time - Chris
Message 5 of 5
(4,603 Views)