On 02/09/2009 17:56, Ian Bambury wrote:
> What exactly is it you are trying to get the space of? The total
> browser window, or some element of the html?
>
> Ian
>
> http://examples.roughian.com
>
>
> 2009/9/2 jahcasa <[email protected] <mailto:[email protected]>>
>
>     Thanks Ian.
>
>     I've tried using getOffsetHeight/Width and whilst it seems to work OK
>     in Hosted mode, it doesn't in Firefox.  Specifically, getOffsetWidth
>     returns the correct width,  but getOffsetHeight returns zero,
>     presumably because at that time, the div is empty and has a height of
>     zero.
>
>     Just want to be clear that I'm trying to get the available space,
>     before adding anything to rootPanel, such that the content to be added
>     will fit inside the browser and inside the allotted div element and
>     will all be visible without the need to scroll.
>
>     I'm thinking that I may need to add rows to the Grid one at a time and
>     back-off when Window getClientHeight or getScrollTop increases.  I'm
>     not sure how I'll do that at the moment, I'll have to experiment.
>     Does it sound like a feasible solution?
>
>     jah
>
>
Oops, forgot to reply to the list.

I'm trying to get the dimensions of the RootPanel which will be bound to
an html div element in the host page.  The app can be added to any
webpage (as long as it's got the required div) and those webpages may
well have headers, footers and sidebars so I want to determine what
space is available to the div - taking into account any surrounding
elements.

jah

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to