LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Front Panel Position Confusion

Solved!
Go to solution

In my program I have multiple wavefrom charts; I would like to call a reentrant subvi, ie small dialog window, that "pops up" over each chart, see attached picture.

 

I would like to dynamically set the position of the dialog window to match that of the waveform chart. However, I am having great difficulty in making any sense of the position, front panel bounds, chart position property nodes. I thought if I set the front panel position in my dialog window to the plot position, the top left hand corners would align. However, that is not working for me.

 

Any help would be appreciated.

 

Cheers,

Andrew

 

0 Kudos
Message 1 of 5
(2,829 Views)

The coordinates returned by the chart property node are relative to the upper left corner of the front panel.  You'll also need to get the front panel bounds of the window containing the chart.  Use the chart coordinates as an offset from that position to set the pop-up window position.

0 Kudos
Message 2 of 5
(2,825 Views)

Nathand,

 

Thanks for your help, but please excuse my ignorance/stupidity for a second.

 

If I move a window around the only property that I see that changes is FP.WIndow Bounds, the position on the Panel soes not change.

 

If I try to manually overlap two separate LabVIEW windows in the top left corner, I cannot get the Window bounds to agree.

 

I am not sure what I am missing here.

 

Thanks again.

Andrew

0 Kudos
Message 3 of 5
(2,818 Views)
Solution
Accepted by topic author mcduff

I'm attaching 2 VIs that I hope will help, if I've understood what you want.  It's extremely sloppy and incomplete but the idea is right.  You click on the chart and some text pops up at the top left corner of the chart, regardless of where the chart window is on the screen.

 

The position of the chart within the panel will not change when the window moves, because the position of the chart is relative to the window that contains it.  So, you can use the chart position as an offset from the window position to find the position of the chart in real coordinates, which you then use as the position of your pop-up.

Download All
Message 4 of 5
(2,807 Views)

Nathand,

 

Thanks for your help. That made a big difference.

 

Cheers,

Andrew

0 Kudos
Message 5 of 5
(2,801 Views)