1.) For these kind of layouts I would always use the LayoutPanels. Instead 
of a DockLayoutPanel you can use a LayoutPanel. Something along these lines:

<g:LayoutPanel>
<g:layer left="0" right="0" top="0" bottom="15px">
    <!-- Main Window content !-->
</g:layer>
<g:layer left="0" right="0" top="15px" bottom="0">
   <!-- Status bar -->
</g:layer>
</g:LayoutPanel>

This will create a 15px status bar at the bottom and the rest will be 
filled by the main content window.
The advantage of using LayoutPanels is that when you resize the browser it 
will call onResize on the child widgets (provided they implement the 
RequiresResize interface). 

2.) Usually you can use getOffsetHeight() and getOffsetWidth() on the 
container widget to get the available dimensions. However you might have to 
defer the call with scheduleDeferred() until the end of the event loop 
because if you call the function to early (before all widgets are attached 
and the layout is done) it will return 0. 


On Thursday, July 19, 2012 10:06:16 AM UTC+2, [email protected] wrote:
>
> Hi All,
>
> I would like to use this layout in my gwt app:
>
> The main window has a VerticalPanel, the first element of  this VP is a 
> TabPanel and the second is a status panel.  
> 1. I need to force the status panel to the bottom of screen. Could I do it 
> with something? Maybe with a css?
> I tried to use DockPanel, but I don't need north panel and it seems to be 
> it can't be 0px height if it is empty:(
>
> 2. I need to know the size of free area inside the tabpanel. How can I get 
> it? I tried with:
> the screen size is:  $wnd.innerWidth; (JSNI)
> getting tabpanel.tabbar size with tabpanel.getTabBar().getOffsetHeight()
> the statusPanel size with statuspanel.getOffsetWidth()
>
> the free space size should be:
> screen size-statuspanel size-tabbar size;
>
> It seems to be good in Opera browser, but cannot works exactly in FF and 
> Chrome. 
>
> Is there any other settings to getting exact size of free area? 
>
> thx a lot
> Zamek
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/SjfaLmXTRPEJ.
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