Hello,
I have a vertical layout with a window component inside it (100% height). In this window component I have a button to add another window component, when the second window is added the scroll appears and I want to scroll to the bottom of the vertical layout to see the second window.
myButton.addClickHandler(new ClickHandler() {
public void onClick(ClickEvent event) {
//create the second window to add
final SecondWindow win2 = new SecondWindow ();
my_vLayout.addMember(win2);
my_vLayout.scrollToBottom();
//Nothing happens
}
});
It seems because scrolls to the bottom of the layout before it draw itself
If a change, my_vLayout.scrollToBottom(); to a function with a callback works, f.e.
SC.confirm("Title", "Continue?", new BooleanCallback(){
@Override
public void execute(final Boolean aBoolean){
my_vLayout.scrollToBottom();
}
});
Any ideas, thanks
I have a vertical layout with a window component inside it (100% height). In this window component I have a button to add another window component, when the second window is added the scroll appears and I want to scroll to the bottom of the vertical layout to see the second window.
myButton.addClickHandler(new ClickHandler() {
public void onClick(ClickEvent event) {
//create the second window to add
final SecondWindow win2 = new SecondWindow ();
my_vLayout.addMember(win2);
my_vLayout.scrollToBottom();
//Nothing happens
}
});
It seems because scrolls to the bottom of the layout before it draw itself
If a change, my_vLayout.scrollToBottom(); to a function with a callback works, f.e.
SC.confirm("Title", "Continue?", new BooleanCallback(){
@Override
public void execute(final Boolean aBoolean){
my_vLayout.scrollToBottom();
}
});
Any ideas, thanks
Comment