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: 

aligning pop-up windows

Hi,

 

I have a series of popup windows (individual vi's with data linked usign global variables) which will take the user through a series of actions. As the top one opens the bottom one closes. I can set the size of each Window using the Window bounds property, but how can I align the content within each vi? Scoll bars are my enemy here!

 

Is there a property that ensures the centre of the vi is placed at the centre of the Window?

 

Graham 

0 Kudos
Message 1 of 6
(2,853 Views)

Hi Graham,

 

Is there a property that ensures the centre of the vi is placed at the centre of the Window?

In the first place you should design your VIs in a way you don't need to set their panel origin later on.

In the second part you could use the frontpanel.origin property…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 6
(2,846 Views)

Many thanks GerdW. Panel origin works perfectly.

 

I'm not sure what you mean about vi design. I place front panel icons near the origin and consider screen size, but when vi's run they invariably need scrolling to be positioned correctly. Setting panel origin and window size should prevent that if scroll bars aren't required.  

 

0 Kudos
Message 3 of 6
(2,835 Views)

Hi Graham,

 

but when vi's run they invariably need scrolling to be positioned correctly

When I design front panels I never need to adjust panel origin at VI start!

So you seem to do something different then I do…

 

One note: I always have the panel origin (point 0,0) in the upper left corner of the front panel. This helps a lot…

 

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 6
(2,830 Views)

You can set the window run-time position to be "centered"

 

Window Run Time Position.png

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

Hi gregoryj,

 

does your comment answer the OP's question "how can I align the content within each vi?"?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 6 of 6
(2,824 Views)