Project

General

Profile

Actions

Feature #3664

closed

WLineEdit set_selectedText

Added by José Luis Rey over 9 years ago. Updated about 9 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

Actions #1

Updated by José Luis Rey over 9 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","");

Actions #2

Updated by Koen Deforche about 9 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).

Actions #3

Updated by Koen Deforche about 9 years ago

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

Actions #4

Updated by Benoit Daccache about 9 years ago

  • Status changed from InProgress to Resolved

Implemented in

commit 592c3b00b51d8461a1a78fd960bc55c2d316804a

Actions #5

Updated by Koen Deforche about 9 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF