Project

General

Profile

Feature #3664

WLineEdit set_selectedText

Added by José Luis Rey over 7 years ago. Updated over 7 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Benoit Daccache
Target version:
Start date:
11/13/2014
Due date:
% Done:

0%

Estimated time:

Description

Hello, I need to set the selection on a WLineEdit, how can be this done ?

Br

#1

Updated by José Luis Rey over 7 years ago

Ok, I answer myself, use a javascript member attached to the dom object:

....

edit~~setJavaScriptMember("jl_editselect_all","function () { document.getElementById(\"\" + edit~~>id() + "\").setSelectionRange(0,document.getElementById(\"" + edit->id() + "\").value.length); }\");

....

edit->callJavaScriptMember("jl_editselect_all","");

#2

Updated by Koen Deforche over 7 years ago

  • Status changed from New to InProgress
  • Assignee set to Benoit Daccache
  • Target version set to 3.3.4

Implement WLineEdit::setSelection(int start, int length) which calls similar JavaScript (but check also how and if this works with IE).

#3

Updated by Koen Deforche over 7 years ago

In fact, there's already a function in Wt.js available that can be used.

#4

Updated by Benoit Daccache over 7 years ago

  • Status changed from InProgress to Resolved

Implemented in

commit 592c3b00b51d8461a1a78fd960bc55c2d316804a

#5

Updated by Koen Deforche over 7 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF