Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   ASP .Net Web Controls (http://www.velocityreviews.com/forums/f63-asp-net-web-controls.html)
-   -   page size... (http://www.velocityreviews.com/forums/t771434-page-size.html)

Jim 10-16-2003 09:13 AM

page size...
 
I have a pop window that is displayed and depending on the state of the
system it will contain any number of user controls(ascx). These controls
contain dynamic content and therefore the size of the control can change
dynamically.

Is it possible to work out the size of the page that is going to be
displayed from the code behind page and then resize the pop window
accordingly?

Cheers

Earth Worm Jim




Patrick Dahmen 10-16-2003 12:22 PM

Re: page size...
 
Ouch sorry. Didn't see...

"Jim" <ssss> wrote in message news:OCoTCV8kDHA.2500@TK2MSFTNGP10.phx.gbl...
> I have a pop window that is displayed and depending on the state of the
> system it will contain any number of user controls(ascx). These controls
> contain dynamic content and therefore the size of the control can change
> dynamically.
>
> Is it possible to work out the size of the page that is going to be
> displayed from the code behind page and then resize the pop window
> accordingly?
>
> Cheers
>
> Earth Worm Jim
>
>
>




Patrick Dahmen 10-16-2003 12:33 PM

Re: page size...
 
Yes I think it is.

I IE you could generally use getBoundingRect() function to retrieve the size of your controls, even if they have no constant size (width or height params within style element)

for example
<script>
function changeWindowSize()
{
var oSizingControl = document.getElementById('sizingControl');
width = oSizingControl.getBoundingClientRect().right - oSizingControl.getBoundingClientRect().left;
height = oSizingControl.getBoundingClientRect().bottom - oSizingControl.getBoundingClientRect().top;

window.resizeTo(width + 25, height + 50);

}
</script>
<body onload="changeWindowSize()">
<asp:Label runat="server" id="sizingControl">Here is my text, i don't know the width and height of</asp:Label>

</body>

I hope that helped...

"Jim" <ssss> wrote in message news:OCoTCV8kDHA.2500@TK2MSFTNGP10.phx.gbl...
> I have a pop window that is displayed and depending on the state of the
> system it will contain any number of user controls(ascx). These controls
> contain dynamic content and therefore the size of the control can change
> dynamically.
>
> Is it possible to work out the size of the page that is going to be
> displayed from the code behind page and then resize the pop window
> accordingly?
>
> Cheers
>
> Earth Worm Jim
>
>
>



All times are GMT. The time now is 07:50 PM.

Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57