Project

General

Profile

Actions

Feature #3664

closed
JR BD

WLineEdit set_selectedText

Feature #3664: WLineEdit set_selectedText

Added by José Luis Rey almost 12 years ago. Updated over 11 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

JR Updated by José Luis Rey almost 12 years ago Actions #1

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","");

KD Updated by Koen Deforche over 11 years ago Actions #2

  • 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).

KD Updated by Koen Deforche over 11 years ago Actions #3

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

BD Updated by Benoit Daccache over 11 years ago Actions #4

  • Status changed from InProgress to Resolved

Implemented in
commit 592c3b00b51d8461a1a78fd960bc55c2d316804a

KD Updated by Koen Deforche over 11 years ago Actions #5

  • Status changed from Resolved to Closed
Actions

Also available in: PDF Atom