Re: How to determine space available to RootPanel.get('some_div')?

2009-09-02 Thread jah
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 jahbo...@gmail.com mailto:jahbo...@gmail.com

 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 google-web-toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en
-~--~~~~--~~--~--~---



Re: How to determine space available to RootPanel.get('some_div')?

2009-09-02 Thread jah

Well I've spent the day experimenting with trying to get the available
height and I'm giving it up as a bad job!
I'll modify the app ( http://code.google.com/p/picavue/ ) and not bother
about paginating the gallery of thumbnails.  I can get the width OK so I
can set Grid columns to fit the available space, but trying to show an
optimum number of rows is just too damn hard - I'll just show all the
thumbs.  Ah well.

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 google-web-toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en
-~--~~~~--~~--~--~---