Modal dialog window not showing scrollbars

Answered
0
0

Hi, I am calling a window as modal dialog from the parent window. The modal dialog window has a grid docked at the bottom. When the browser is resized, neither the modal window nor the grid inside showing any scrollbars.

How to display the scrollbar automatically when the browser is resized?

  • You must to post comments
Best Answer
0
0

I run your sample:

  • Window1 is maximized therefore it is resized with the browser therefore it shows the scrollbars when Window1 is resized
  • Window2Search is created not maximizable, not resizable, not movable, therefore it doesn’t resize, if it doesn’t resize the content obviously always fits

It’s all working correctly.

You can:

  1. Maximize Window2Search so it’s resized automatically when the browser resizes; or
  2. Resize it programmatically when the browser resize depending of what you need to leave as a margin since we cannot guess it. Attach to the Application.BrowserSizeChanged event and use Application.Browser.Size or Screen.Bounds to get the size of the browser.

There is no different between a window or a modal window and resizing the browser resizes the browser and automatically resizes the page and maximized windows. It cannot possibly resize floating windows.

 

  • Thameem Ansari
    Thanks a lot for your suggestion. Now it works.
  • You must to post comments
0
0

Hi, in this project, there are two windows. The parent window shows the scrollbars when the browser is resized. No matter whether the parent window is independent or a child window. But the search window is not showing a scrollbar when the browser is resized. Herewith I have attached both the images and the project.

  • You must to post comments
0
0

If the content of the floating fixed modal dialog fits the window which scrollbars do you want to show when the browser is resized?

If you want to “scroll” the floating window inside the browser when it’s partially out of view, that is not possible by design. If you want to keep the dialog centered, use KeepCentered = true. If you want to resize the window you can and in that case the scroll bars will automatically show when the content doesn’t fit.

if you have any other case send a test case or an image showing where and which scroll bars you need to show.

  • Thameem Ansari
    I have attached the images and the sample project.
  • You must to post comments
0
0

Modal or “normal” are the same. Resizing the browser doesn’t change the size of the form unless it’s maximized. Can you send a test case?

  • Thameem Ansari
    The modal window is used for data search purposes and it displays as a popup. The WindowState is ‘NORMAL’ and FormBorderStyle is ‘FIXED’. But AutoScroll is ‘TRUE’ and ScrollBars is ‘BOTH’. So, in this scenario, is it not possible, to make the scroll bar visible, if the browser is resized?
  • You must to post comments
0
0

Use AutoScroll = true.

  • Thameem Ansari
    I already set AutoScroll=true. After that only I raised the question. If it is a normal window (not a modal window), when the browser is resized, the scrollbar appears automatically. But in the modal window, it won’t.
  • You must to post comments
Showing 5 results
Your Answer

Please first to submit.