Ok, here is my current design, I have 3 panels inside a Grid & the Grid is inside a ScrollPanel. I want that when the ScrollBar of the ScrollPanel got scrolled it will always show the 3rd panel.
Grid myGrid=new Grid(1,3); myGrid.getCellFormatter().setVerticalAlignment(0, 0, HasVerticalAlignment.ALIGN_TOP); myGrid.getCellFormatter().setVerticalAlignment(0, 1, HasVerticalAlignment.ALIGN_TOP); myGrid.getCellFormatter().setVerticalAlignment(0, 2, HasVerticalAlignment.ALIGN_TOP); myGrid.setWidget(0,0,panel1); myGrid.setWidget(0,1,panel2); myGrid.setWidget(0,2,panel3); //normally the Panel 1 & 2 is much longer than panel3 final ScrollPanel myScrollPanel=new ScrollPanel(); myScrollPanel.add(myGrid); myScrollPanel.addScrollHandler(new ScrollHandler(){ @Override public void onScroll(ScrollEvent event) { myScrollPanel.ensureVisible(panel3); } }); Ok, when i scroll the scrollbar of the myScrollPanel down to see the bottom gui of panel2, it always show the panel3, that is correct but i couldn't see the bottom gui of panel2 since the system forced to visible the panel3 all the time.
SO do you have any solution for this problem? maybe design differently?
http://stackoverflow.com/questions/24124247/how-to-change-this-design-so-that-when-the-scrollbar-of-a-scrollpanel-got-scroll
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.
For more options, visit https://groups.google.com/d/optout.
No comments:
Post a Comment