Gwt ScrollPanel scrollToBottom()不工作
我无法使Gwt ScrollPanel scrollToBottom()不工作,gwt,Gwt,我无法使ScrollPanel.scrollToBottom正常工作。它不会滚动到面板的底部。下面是一个示例片段: FlexTable flexTable = new FlexTable(); // Add loads of rows to the flex table here.. ScrollPanel scrollPanel = new ScrollPanel(flexTable); scrollPanel.scrollToBottom(); // Add the scrollPanel
ScrollPanel.scrollToBottom
正常工作。它不会滚动到面板的底部。下面是一个示例片段:
FlexTable flexTable = new FlexTable();
// Add loads of rows to the flex table here..
ScrollPanel scrollPanel = new ScrollPanel(flexTable);
scrollPanel.scrollToBottom();
// Add the scrollPanel to the view here..
我还尝试过在onLoad()
重写方法中使用scrolltobttom()
方法,但它不起作用
我在这里做错了什么?延迟
scrolltobttom()
命令,以便ScrollPanel准备接受输入
Scheduler.get().scheduleDeferred(new Scheduler.ScheduledCommand() {
@Override
public void execute() {
// your commands here
scrollPanel.scrollToBottom();
}
});
将scrollPanel添加到视图后,您是否尝试过scrollToBottom?