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: 

how to programatically place waveform indicator in the middle of the front panel

I would like to place the waveform indicator in the middle of the front panel when the vi is running. Is it possible?? :mansad:
0 Kudos
Message 1 of 8
(2,715 Views)
I think so,

i've made a quick example to help you with that.

See if that's solves the problem
Software developer
www.mcm-electronics.com





PORTUGAL
0 Kudos
Message 2 of 8
(2,706 Views)
Sure that's possible. Simply create a control property "Bounds", and a property "Position". Also create a new property, and link it to the pane. Make a property "Bounds", and "Origin".


(Pane.Bounds - Control.Bounds ) / 2 + Pane.Origin is your new Control.Position.


Note that all clusters are the same, so you don't need to split any of the clusters! Note that the control label and chart legend etc. are also included in the control's bounds.


Regards,


Wiebe.
Message 3 of 8
(2,703 Views)
Please find the vi attached. I tried this way,but could not attain it programatically. I could not get what Wiebe has written.
I am currently using Labview Evaluatuion Version 8.0
0 Kudos
Message 4 of 8
(2,672 Views)

I think this is what Wiebe means...

See the attached Vi in LV 7.1

Do post your feedback here...

- Partha ( CLD until Oct 2024 🙂 )
Message 5 of 8
(2,665 Views)
Try out this quick modification.
 
Move the Stop button to a different place on the FP & then run the VI to see the graph getting centred.
This is what is exactly meant by the Panel Bounds property. It takes the outermost value of the control's bounds sitting on the FP.
- Partha ( CLD until Oct 2024 🙂 )
Message 6 of 8
(2,660 Views)
ya this near to my solution. one thing missing is that during running if i enable the horizontal and vertical scrollbars  and try to resize then it is not coming in the middle of the front panel
0 Kudos
Message 7 of 8
(2,639 Views)
It appears that the bounds property node found in the previous attachments in this thread is not working.  However FP.PanelBounds is working.  See the attached, run the VI, and change the size of the front panel.  Note that the "Good Property" correctly updates, whereas the "Bad Property" seems to go in the opposite direction.

I don't see how this would be expected behavior.  I've filed this issue internally.
0 Kudos
Message 8 of 8
(2,605 Views)