From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Positioning panel origin inside the panel, not postioning panel on screen

Solved!
Go to solution

Is there a run-time property for the form/panel that you can use to control the origin of the panel.  When I say origin, I am referring to the 0,0 coordinates used in the LEFT and TOP offsets used by the controls.  I found the FP.PanelBounds and FP.WindowBounds under the VI Server>VI>VI class.  However, this only moves the panel relative to the monitor.  I want to be able to move the panel visible portion relative to the form.  Exactly like the scroll bars do to the panel.  When using the scroll bars, I cannot accurately line up the origin in the upper left corner which throws off my form.  I am using this to develop a GUI on a 800x600 display, so the slightest offset is noticeable.  I have included an image to help explain.

 

 

0 Kudos
Message 1 of 2
(1,869 Views)
Solution
Accepted by topic author dedelmann

You have to implement something like this:

MovePane.PNG

 

Norbert

 

Note that this code leaks references and does not work properly when using more than a single pane.

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 2 of 2
(1,864 Views)