Welcome Guest Search | Active Topics | Sign In | Register

Dialog Resize problem in Internet Explorer Options
Jamie Miller
Posted: Thursday, September 8, 2011 12:32:30 PM
Rank: Member
Groups: Member

Joined: 2/6/2009
Posts: 26
Hi,

I've got a basic Dialog:

Code: HTML/ASPX
<eo:Dialog runat="server" ID="ViewDocFullDialog" ContentUrl="about:blank" BorderStyle="Solid" AllowResize="False"
            ControlSkinID="None" Width="950px" BorderWidth="1px" Height="650px" ShadowColor="LightGray"
            BorderColor="#000087" BackShadeColor="Gray" BackShadeOpacity="75"
            IsModal="true" AllowMove="false">
            <FooterStyleActive CssClass="eo_dialog_footer"></FooterStyleActive>
            <HeaderStyleActive CssClass="eo_dialog_header"></HeaderStyleActive>
            <ContentStyleActive CssClass="eo_dialog_content"></ContentStyleActive>
</eo:Dialog>


The url to show is being set via javascript using setContentUrl and then displayed using show(true).

I have hooked up to the window.onresize event to resize the dialog to always have a 20 pixel space around it. This works fine.

However, if I maximize the browser window and then make it smaller I end up with white space at the right-hand side, ie the BackShadeColor does not fill the background behind the dialog.

I think the white space is where the main browser scrollbar would be and I think it's happening because when you bring the browser out of "maximized" the dialog is too large for the browser window and so it briefly shows a scrollbar, the dialog is then resized by my code that is attached to the window resize event. The scrollbar then disappears leaving behind the white space where the scrollbar was.

This works perfectly fine in Chrome and I can also get around it by calling the dialog resize function twice instead of just once. It also works fine if you just make the browser window larger and then smaller... so long as you don't go into maximized.

Dose that make sense?

Any ideas?
eo_support
Posted: Thursday, September 8, 2011 1:43:30 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Hi,

Your theory makes a lot of sense. You may want to try to resize the dialog a little while after (use setTimeout to delay the call) your main window has resized; or use a timer to check your main window's size and then resize the dialog whenever you see the window size changes. It can get tricky and messy with scrollbars when resizing window and the dialog at the same time.

Thanks!
Jamie Miller
Posted: Friday, September 9, 2011 4:00:31 AM
Rank: Member
Groups: Member

Joined: 2/6/2009
Posts: 26
eo_support wrote:
Hi,

Your theory makes a lot of sense. You may want to try to resize the dialog a little while after (use setTimeout to delay the call) your main window has resized; or use a timer to check your main window's size and then resize the dialog whenever you see the window size changes. It can get tricky and messy with scrollbars when resizing window and the dialog at the same time.

Thanks!


Unfortunately delaying the resize of the dialog by 1 second or 1 minute wouldn't make a difference because the browser scrollbars will still be there. Somehow I need to get the dialog to redraw the BackShade and the only way I've found to do that so far is to call the resize method again.

The difference in Google Chrome is that when the EO Dialog is larger than the browser window you don't get browser scrollbars.
eo_support
Posted: Friday, September 9, 2011 8:38:42 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Hi,

In that case you probably want to setup a timer to check window size excluding the browser and call resize when you see the size change.

Thanks


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.