Is it possible to adjust the size of a ScrollPanel with percent width?
According to GWT documentation, not: 
http://google-web-toolkit.googlecode.com/svn/javadoc/1.5/com/google/gwt/user/client/ui/ScrollPanel.html

On Thursday, July 26, 2012 11:22:38 AM UTC+2, Maho wrote:
>
>  W dniu 26.07.2012 11:18, Daniel Gonzalez pisze:
>  
> Hi, 
>
>  I am setting the size of my ScrollPanel like this:
>
>       def adjustSize(self, windowWidth, windowHeight):
>
>          scrollWidth = windowWidth - self.scroller.getAbsoluteLeft() - 
> CALLS_DETAILS_WIDTH - 2 * SCROLLBAR_WIDTH
>         if (scrollWidth < 1):
>             scrollWidth = 1
>
>          scrollHeight = windowHeight - self.scroller.getAbsoluteTop() - 
> PAGER_HEIGHT
>         if (scrollHeight < 1):
>             scrollHeight = 1
>
>          self.scroller.setSize("%dpx" % scrollWidth, "%dpx" % 
> scrollHeight)
>   
> The point is that this particular component (CallsList) is to the left of 
> another component (CallDetails), and on top of another component (Pager). 
> Besides, I am taking into account the width of the scrollbar. But I am not 
> getting this right. My problems are:
>  
>  
>    1. What is the real size of the scroll bar? How do I get this 
>    information without defining an arbitrary constant (which is what I am 
>    doing now, set to 9 points - I got the hint from the mail example) 
>    2. How do I know how big are the other components? Actually, what I 
>    want if that my components are filling completelly the page. Some are 
> bound 
>    to be attached to the  bottom border, some to the right border, some to 
> the 
>    right border and so on, but they must fill completelly the window. 
>
> Do you have any general advice about resizing ScrollPanels?
>  
>
>
> I would rather adjust things inside your component using percentage width 
> (CSS), and adjust size of whole component using pixel width. 
>
>
> -- 
> pozdrawiam
>
> Łukasz Mach - [email protected]
>
> 

-- 



Reply via email to