How to select text in TIWEdit

<< Click to Display Table of Contents >>

Navigation:  Forum >

How to select text in TIWEdit

Forum link

 


 

03-30-2022, 09:16 AM:

 

Hello,

 

I would like to select text in a TIWEdit control as soon as the page is rendered.

 

I played a little with Javascript in ScriptEvent property without success.

 

How can I do it?

 

Thank you,

 

Davide

 


 

03-30-2022, 09:00 PM:

 

Set the ActiveControl property on the page to that TIWEdit.

 


 

03-31-2022, 12:32 PM:

 

(03-30-2022, 09:00 PM)kudzu Wrote: [ -> ]Set the ActiveControl property on the page to that TIWEdit.

 

Thank you for your quick suggestion.

 

Setting the ActiveControl focus the control but does not select the text.

 

I would like to focuse the control and select the contained text so the user can digit immediatly overwriting the default present in the control when the page is shown. 

 

Thank you,

 

Davide

 


 

04-01-2022, 05:59 PM:

 

(03-31-2022, 12:32 PM)David1 Wrote: [ -> ] (03-30-2022, 09:00 PM)kudzu Wrote: [ -> ]Set the ActiveControl property on the page to that TIWEdit.

 

Thank you for your quick suggestion.

 

Setting the ActiveControl focus the control but does not select the text.

 

I would like to focuse the control and select the contained text so the user can digit immediatly overwriting the default present in the control when the page is shown. 

 

Thank you,

 

Davide

 

ScriptEvents->onFocus

 

  EDTEXTFIELDIWCL.select();

 

  EDTEXTFIELDIWCL.style.backgroundColor="#00ff00";

 

even when your Textfield is edTextField - you must use Uppercase in Scripts for Intraweb-Controls

 


 

04-02-2022, 11:07 PM:

 

We are introducing method SelectAll() to all IWEdit descendants and IWMemo descendants in the next release.

 


 

04-04-2022, 10:44 AM:

 

(04-01-2022, 05:59 PM)kpenzkofer Wrote: [ -> ] (03-31-2022, 12:32 PM)David1 Wrote: [ -> ] (03-30-2022, 09:00 PM)kudzu Wrote: [ -> ]Set the ActiveControl property on the page to that TIWEdit.

 

Thank you for your quick suggestion.

 

Setting the ActiveControl focus the control but does not select the text.

 

I would like to focuse the control and select the contained text so the user can digit immediatly overwriting the default present in the control when the page is shown. 

 

Thank you,

 

Davide

 

ScriptEvents->onFocus

 

  EDTEXTFIELDIWCL.select();

 

  EDTEXTFIELDIWCL.style.backgroundColor="#00ff00";

 

even when your Textfield is edTextField - you must use Uppercase in Scripts for Intraweb-Controls

 

Thank you, it function as expected 

 


 

04-05-2022, 01:12 AM:

 

If you update to IW 15.2.52 you can use IWEdit.SelectAll method from your Delphi code now. :-)

 

https://www.atozed.com/2022/04/intraweb-15-2-52/