Pop Panel On Smaller screen Size - VLFOne
Posted: Tue Jan 12, 2021 4:33 am
I have several Pop up Panels that push up above the browser but only on screens smaller than 1920x1080. I also have some that don't do this and it has the same code. If I hit F11 to make it full screen I see it fine and then get out of full screen it is fixed until I need the popup again.
This is how I get it to center on the screen instead of placement center. I can not use the placement center function.
Should look like this...
This is how I get it to center on the screen instead of placement center. I can not use the placement center function.
Code: Select all
* Fields to calculate middle of screen
Define Field(#screenWidth) Type(*INT)
Define Field(#screenHeight) Type(*INT)
Define Field(#com_width) Type(*INT)
Define Field(#com_heigtht) Type(*INT)
* calculate where the middle of the screen is
#screenWidth := #SYS_WEB.WebPage.Width
#screenHeight := #SYS_WEB.WebPage.Height
#com_width := #COM_OWNER.Width
#com_heigtht := #COM_OWNER.Height
#COM_ANCESTOR.ShowPopup Left((#screenWidth - #com_width) / 2) Top((#screenHeight - #com_heigtht) / 2)