Forum Stats

  • 3,782,325 Users
  • 2,254,637 Discussions
  • 7,880,045 Comments

Discussions

How can I resize a modal window?

user1.0
user1.0 Member Posts: 81 Red Ribbon

I'm using Apex 19.2

I hesitate to ask this question since the last 2 I received nothing but grief about but here it goes.

I have a modal window with an interactive grid region.

Originally the page was created as part of a wizard, but I've set the Wizard region to never display. I'm only mentioning this in case the creation method matters for some reason.

I need to add a field or two above the IG so I need a little more space.

By default it's my understanding Modal windows are 400 x 400.

Here I set the height to 600 but there was no change to the size of the window.


Tagged:

Best Answer

  • user1.0
    user1.0 Member Posts: 81 Red Ribbon
    Accepted Answer

    If I set all the pages to the same size it works.

    It's ugly, but I'll live with it.

    I don't want to put too much on a page because it will confuse my users.

    But I needed to use a grid on the last step, which requires more space.

    Maybe I'll increase the font size or something on the pages where there's now too much space.

Answers

  • fac586
    fac586 Senior Technical Architect Member Posts: 20,344 Red Diamond

    Here I set the height to 600 but there was no change to the size of the window.

    How are you testing this? As the modal dialog is rendered in an iframe on the calling page, the calling page must be reloaded so that the iframe is rendered with the new size.

  • user1.0
    user1.0 Member Posts: 81 Red Ribbon

    I'm trying to create a wizard. So, the pages before this one are also modals.

    My home page calls the first modal which branches to the modal 2 then 3, 4 etc.

    So, to test this, I'm logging out and clearing my browser link to reset the session.

    Logging in

    Clicking my "start wizard" button which starts my chain of modals.

    I then just answer the questions and click next until I get to the page with my IG.

    The reason I took out the Wizard regions was because I'm trying to reuse pages in various branching scenarios so I don't have to maintain several copies of the same page.

    Do all my modals have to be the same size? If so, I can do that.

  • user1.0
    user1.0 Member Posts: 81 Red Ribbon
    Accepted Answer

    If I set all the pages to the same size it works.

    It's ugly, but I'll live with it.

    I don't want to put too much on a page because it will confuse my users.

    But I needed to use a grid on the last step, which requires more space.

    Maybe I'll increase the font size or something on the pages where there's now too much space.

  • fac586
    fac586 Senior Technical Architect Member Posts: 20,344 Red Diamond

    If I set all the pages to the same size it works. 

    It's ugly, but I'll live with it.

    I think that's better than the dialog size growing and shrinking on each step in the wizard.

    I don't want to put too much on a page because it will confuse my users.

    But I needed to use a grid on the last step, which requires more space.

    Maybe I'll increase the font size or something on the pages where there's now too much space.

    I've dealt with a couple of similar situations recently.

    One was a data loading process, awkwardly the first page only contained a single file browser control, which was followed by 2 with honking great interactive reports, and then 2 with media lists of variable length. For this I left the first page at the default size so the single file control didn't look ridiculously orphaned (this was on 19.2—on a later version I could have used a larger drop zone for file upload), and then used the Stretch to Fit Window option on the following pages. That only involved one jump in size. Didn't look great to me but the customer hasn't said anything.

    The other was a 3 page process wizard: only 3 form controls on page 1; big shuttle on page 2; and minimally editable interactive grid on page 3. On this one I went with Stretch to Fit Window on all 3 pages to maximise the information displayed on pages 2 and 3. On page 1 the Optional - Floating template was used for the form controls, which were centred on the page and sized fairly generously by positioning them in Column 5 with Column Span 4. Still a lot of empty space on page 1 but its the best solution to this problem I have seen so far.

    The reason I took out the Wizard regions was because I'm trying to reuse pages in various branching scenarios so I don't have to maintain several copies of the same page.

    They could be kept by showing/hiding the step list entries conditionally depending on the scenario being followed, or generated dynamically in SQL or PL/SQL. The problem then is what to show before all of the dependencies are resolved when the overall progression depends on earlier stages in the wizard?