java - GWT : Cursor position at the end when tab is pressed -


i have link 2 option edit & delete. when 1 click on link text box appears in text box content of link appear need cursor position @ end of text without using mouse of tab index only.

final textbox edittb = new textbox(); edittb.addstylename(edit_fav_delete_style); edittb.settext(favoritebean.getname());  scheduler.get().scheduledeferred(new scheduledcommand() {  @override public void execute() {  editfavoritetb.setfocus(true); }     }); 

already using setfocus(true) showing cursor position @ start of text need @ last.

check this

    final textbox edittb = new textbox();     edittb.addstylename(edit_fav_delete_style);     edittb.settext(favoritebean.getname());      scheduler.get().scheduledeferred(new scheduledcommand() {      @override     public void execute() {      editfavoritetb.setfocus(true);      edittb.setcursorpos( favoritebean.getname().length());     }   }); 

Comments

Popular posts from this blog

php - Calling a template part from a post -

Firefox SVG shape not printing when it has stroke -

How to mention the localhost in android -