Skip to Content
author's profile photo Former Member
Former Member

Position of an non modal external window

How is it possible to set the position of an non modal external window?

I've tried it over

window.setWindowPosition(new WDCssSize(500,WDWindowUnitOfLength.PX),new WDCssSize(200, WDWindowUnitOfLength.PX));

and also over

window.setWindowPosition(500,200);

The result is always the same, the window is shown on the top left.

Best regards,

Thomas

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

12 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Jan 14, 2009 at 06:03 PM

    Hi Thomas,

    I set window position for a modal window and it worked for me. But you are using this for non modal external window. I am not sure that we can set position for external window too.

    Have a trial like this.

    Set the window size first then set position like

    window.setWindowSize(500,200);
    window.setWindowPosition(100,200);

    Check your browser options too to open in a new window.

    Regards,

    Siva

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 15, 2009 at 03:42 AM

    Hi Thomas,

    Have you tried decreasing the starting location of the window, i.e., rather than starting from 500 start from 100 and then check. May be the size of your window is exceeding and so it is taking the default settings.

    Because I tried the same thing using the following code:

    {pop1.setWindowPosition(50,50);}

    and it worked and even i changed the parameters and even then it worked.

    Regards.

    Rajat

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 15, 2009 at 09:24 AM

    I investigate the problem further and tried also the solutions that where provided here.

    In Firefox the resizing of the window works without problems. In IE 7 still the same result.

    Resizing is not taken in account.

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Thomas,

      Try this..

      String dialog = "Do you Want to Close the Application (Yes/No) ? " ;

      IWDConfirmationDialog confDialog = wdComponentAPI.getWindowManager().createConfirmationWindow(dialog,wdThis.wdGetAPI().getViewInfo().getViewController().findInEventHandlers("Yes"),"Yes");

      confDialog.addChoice(wdThis.wdGetAPI().getViewInfo().getViewController().findInEventHandlers("No"),"No");

      confDialog.setTitle("Validation Window");

      confDialog.setWindowPosition(WDWindowPos.TOP);

      confDialog.setWindowSize(200,100);

      confDialog.open();

      Thanking You,

      Mithu

      Edited by: Mithu Ghosh on Jan 15, 2009 10:51 AM

  • author's profile photo Former Member
    Former Member
    Posted on Jan 15, 2009 at 09:48 AM

    Hi,

    As mentioned in the documentation of the IWDWindowMnager.

    In 6.30+, the window must be amodal.

    Regards,

    Gayathri.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 15, 2009 at 10:40 AM

    Changing the postion works in an ConfirmationWindow. I've tested it already.

    But i want to show content from an external server in the windows. ( pdf files etc...)

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 15, 2009 at 11:17 AM

    Hi Thomas,

    Which type of external window are you creating, i.e., ExternalWindow or NonModalExternalWindow?

    Also if possible give the complete code you are using?

    May be there is something wrong in the code?

    Regards.

    Rajat

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 15, 2009 at 11:24 AM

    I'm using an NonModalExternalWindow.

    The window is created over

    IWDWindow window = wdComponentAPI.getWindowManager().createNonModalExternalWindow(res.getUrl(WDFileDownloadBehaviour.OPEN_INPLACE.ordinal()), this.wdComponentAPI.getTextAccessor().getText(IMessageZahlflow.VIEW_BELEG));
    

    over

    window.setWindowSize(512;400);
    window.setWindowPosition(50,50);
    

    the layout of the window is changed.

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Thomas,

      I tried this for you and I could get the solution too. As I told earlier you you need to change your browser settings too. Since you are using IE 7.0, try like this:

      In IE,

      Click on Tools in the menubar (in IE top-right).

      Select Internet Options.

      A pop-up will come

      Under the General tab, we have 4 sections. 1.Home Page 2.Browsing History 3.Search 4. Tabs

      Click on Settings button in Tabs section.

      Here we have 3 sections of settings

      The below two section are radio buttons,

      For, When pop-up is encountered : Always open pop-ups in a new window

      Open links from other programs in: A new window

      Then click on OK.

      And main popup also click on OK.

      Close the browser and open your application in a new window. You will see the result that you wanted

      Regards,

      Siva Rama Krushna.

  • author's profile photo Former Member
    Former Member
    Posted on Jan 15, 2009 at 11:58 AM

    Hi Thomas,

    I guess this is some compatibility issue. Try the following things:

    1) Check with the following code on your side:

    IWDWindow pop1=wdComponentAPI.getWindowManager().createNonModalExternalWindow("http://www.google.com","google");
    	pop1.setWindowSize(512,600);
    	pop1.setWindowPosition(50,100);
    	
    	pop1.show();
    
    

    Make changes in position and size. See if its working.

    2) Try to check it on IE 6.0 or lesser or Mozilla 4.0. May be some compatibility issue is there.

    I do not have any particular reason for your question. Some minor thing is missing here.

    As you wrote its working for Inteenet Address may be something to do with the compatibility issue.

    Regards.

    Rajat

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 15, 2009 at 11:12 AM

    I tried it over

     window.setWindowPosition(WDWindowPos.CENTER); 

    but the result is the same. Positioning information are not taken.

    Window still open on the top left of the screen.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 15, 2009 at 11:38 AM

    Hi Thomas,

    I tried the same. The code I tried is:

    IWDWindow pop1=wdComponentAPI.getWindowManager().createNonModalExternalWindow("http://www.google.com","google");
    	pop1.setWindowSize(512,600);
    	pop1.setWindowPosition(50,100);
    	
    	pop1.show();
    

    Its working fine for me. Even I tried changing the parameters for size and position. It worked fine.

    Just 1 thing I noted in you post. You gave the code as:

    window.setWindowSize(512;400);

    although I think it should be

    window.setWindowSize(512,400);

    I do not know whether it was a typo or its in the application(it would have been syntax error in your application).

    I am using IE 6.0. May be its something to do with the versioning.

    Regards.

    Rajat

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.