cancel
Showing results for 
Search instead for 
Did you mean: 

How to change a modal window size to fit into an arbitrary browser size?

Former Member
0 Kudos

Hi,

I have a modal window created like this:

wdComponentAPI.getWindowManager().createModalWindow(windowInfo)

Unfortunately the size I have given to it is too big for some browsers(screens) and the result is a popup which is cut at the edges and also cannot be scrolled to show its content. That’s why I need somehow to dynamically set the modal window size depending on the browser and the resolution it will be shown.

Is this possible at all and if ‘yes’ how?

Thanks for the replies

Best regards,

Jeny

Accepted Solutions (0)

Answers (1)

Answers (1)

siarhei_pisarenka3
Active Contributor
0 Kudos

Hi I032826

Maybe it'd be helpful to set the popup's size in percents

WDCssSize width = new WDCssSize(80, WDWindowUnitOfLength.PER_CENT);
WDCssSize height = new WDCssSize(80, WDWindowUnitOfLength.PER_CENT);
IWDWindow.setWindowSize(width, height);

BR

Sergei