Select Text in TextBox when entering

Answered
0
0

Is it possible to select the full Text in the Texbox when it is entered?

  • You must to post comments
Best Answer
0
0

Hi Markus,

SelectOnEnter is now (starting with Wisej Dev Build 2.1.56)
available for TextBoxes, ComboBoxes, UpDownControls and DateTimePickers.

Best regards
Frank

  • You must to post comments
0
0

Hi Markus,

this issue is fixed in our latest Wisej development build (2.1.64).

Thanks again for your feedback and help in putting us on the right track.

Best regards
Frank

  • You must to post comments
0
0

Hi Frank,

it was more difficult to reproduce then we thought 😉

It only happens when you tab out of a NumericUpDown into another NumericUpDown, both with “SelectOnEnter = true”. And it only happened on IE so far.

See attached sample.

Thanks

Markus

  • Frank (ITG)
    Hi Markus, thanks a lot for plugging in the missing pieces. We´ll check and get back to you. Best regards, Frank
  • You must to post comments
0
0

Hi Markus,

I have tried to reproduce this problem but failed so far.

Can you please set up a small test case ?

Thanks in advance.

Best regards
Frank

  • You must to post comments
0
0

Hi Frank,

thank you for making this available so quick.

So far this is looking good. However we noticed one bug with this feature:

  1. Set SelectOnEnter = true for a NumericUpDown
  2. Enter a value in the NumericUpDown
  3. Use the tab key to leave the NumericUpDown

The application then crashes completely, because it’s stuck in an endless loop. As far as we can tell this is only happening when using the Internet Explorer.

Thanks and regards

Markus

  • You must to post comments
0
0

Hi Frank,

thank you! This will be a very useful enhancement for us. Do you have any estimate on when this feature will be available (next release or later)?

Thanks and regards

Markus

  • You must to post comments
0
0

Hi Markus,

we are working on an enhancement to support a new property SelectOnEnter().
Logged as #2223.
I´ll keep you updated about our progress.

As a (very) quick workaround you can add a ClientEvent to your UpDownControl
for event “focusin” add this code:
var me = this;
setTimeout(function() {me.tabFocus() },50);

Best regards
Frank

  • You must to post comments
0
0

Hi Frank,

is there a similar option for a NumericUpDown? So when you click in a NumericUpDown field the whole text gets selected (instead of setting the cursor before the first digit). The NumericUpDown does not seem to have the same properties you described for the Textbox.

Thanks and regards

Markus

  • You must to post comments
0
0

Thank you, this helped.

Best regards

Rupert

  • You must to post comments
0
0

Hi Rupert,

by entered you mean when you click with the mouse into a text box ?
Because when I tab into a textbox this should already be the default behavior.

To add the same when clicking with the mouse try to attach to the Enter event
and then

this.textBox.SelectionStart = 0;
this.textBox.SelectionLength = this.textBox.Text.Length;

Hope that helps.

Best regards
Frank

  • You must to post comments
Showing 10 results
Your Answer

Please first to submit.