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
(3,043 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
(3,036 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
(3,025 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
(3,020 Views)

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

 

Window Run Time Position.png

0 Kudos
Message 5 of 6
(3,019 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
(3,014 Views)