Monday, March 4, 2013

Re: Why doesn't this (AbsolutePanel inside a ScrollPanel) work?

That got me thinking.  I can't really get rid of tbe ScrollPanel because a number of other panels other substituted into it.  But adjusting the overflow on the ScrollPanel seems to work.  So onResize() looks like this:

Style.Overflow cssover = Style.Overflow.HIDDEN;

if( w < absolutePanel.getWidgetLeft( horizontalPanel ) + horizontalPanel.getOffsetWidth() )
{
cssover = Style.Overflow.AUTO;
aw = absolutePanel.getWidgetLeft( horizontalPanel ) + horizontalPanel.getOffsetWidth();
}
if( h < absolutePanel.getWidgetTop( horizontalPanel ) + horizontalPanel.getOffsetHeight() )
{
cssover = Style.Overflow.AUTO;
ah = absolutePanel.getWidgetTop( horizontalPanel ) + horizontalPanel.getOffsetHeight();
}
scrollPanel.getElement().getStyle().setOverflow( cssover );
absolutePanel.setWidth( aw + "px" );
absolutePanel.setHeight( ah + "px" );




On Saturday, March 2, 2013 5:52:54 AM UTC-8, Patrick Tucker wrote:
Try absolutePanel.getElement().getStyle().setOverflow(Overflow.AUTO) and get rid of the ScrollPanel.  It by default sets overflow to hidden, but it may work.

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

No comments:

Post a Comment