how i can make that scroll, to be done automatically? to focus on last
line added?
anyone had that problem?
cheers.
M.
Try something like this (the secret lies in area.setCursorPos(area.getText().length());)
public class Blubber20 implements EntryPoint{
public void onModuleLoad() {
VerticalPanel v = new VerticalPanel();
final TextArea area = new TextArea();
v.add(area);
final TextBox box = new TextBox();
Button btn = new Button();
v.add(box);
v.add(btn);
btn.addClickListener(new ClickListener(){
public void onClick(Widget sender) {
area.setText(area.getText()+box.getText());
box.setText("");
area.setCursorPos(area.getText().length());
}
});
RootPanel.get().add(v);
}
}
HTH
Dominik
-----Ursprüngliche Nachricht-----
Von: Google-We...@googlegroups.com [mailto:Google-We...@googlegroups.com] Im Auftrag von eM
Gesendet: Freitag, 18. Mai 2007 13:46
An: Google Web Toolkit
Betreff: TextArea and "auto scroll" problem when adding new text
any ideas?
M..