This is a migrated thread and some comments may be shown as answers.

RadMaskedTextInput - select content with mouse

4 Answers 201 Views
MaskedInput (Numeric, DateTime, Text, Currency)
This is a migrated thread and some comments may be shown as answers.
HAG
Top achievements
Rank 2
HAG asked on 29 Jul 2013, 10:30 AM
Hi

I'm trying to migrate RadMaskedTextBox to RadMaskedTextInput and I'm experiencing strage behaviour in RadMaskedTextInput:

I have a TextBox where the content takes half of the TextBox width. With the RadMaskedTextBox I was able to click anywhere in the free part of the TextBox, hold down the mouse button and select the content with a move to the left side.

In RadMaskedTextInput I have to put the cursor right beside the last character in the TextBox to do this. The free parts of the TextBox just show the normal mouse cursor and not the text-input-cursor.

Is it possible to activate the behaviour of the old RadMaskedTextBox in the new RadMaskedTextInput for making a text-selection with the mouse?

Attached you will find 2 pictures:
The first TextBox on the pictures is the RadMaskedTextInput
The second TextBox is the RadMaskedTextBox

Picture1 (StartSelection.jpg) shows the start of the selection and the different cursors. At the point where you can see the cursors, I'm starting to hold down mouse left and move the mouse to the left

Picture2 (EndSelection) shows that only the text in the RadMaskedTextBox was selected as desired. The text in the RadMaskedTextInput remains unselected.

To select the text in the RadMaskedTextInput I have to move the cursor to the position shown in picture3 (radmaskedtextinput.jpg)

4 Answers, 1 is accepted

Sort by
0
Pavel R. Pavlov
Telerik team
answered on 01 Aug 2013, 06:38 AM
Hi Christian,

Thank you for contacting us on this matter. The new RadMaskedInput suite exposes new mechanism for selecting the text of the control. You can try setting the SelectionOnFocus property to SelectAll (read more). By doing so you will be able to select all the text of the control by focusing the control.

Please try this approach out and let me know if it works for you.

Regards,
Pavel R. Pavlov
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
0
HAG
Top achievements
Rank 2
answered on 01 Aug 2013, 06:58 AM
Hi Pavel,

thank you for your reply. I have already noticed and testet the SelectionOnFocus property with all possibilities.
SelectAll solves the problem when the RadMaskedTextInput gets the focus (but it is just a workaround, because sometimes I don't want to select all the content). But if the RadMaskedTextInput already is focused, the problem remains... I (and I think also users in general) don't expect such behaviour from a Text-control.

The other Telerik controls ( AutoCompleteBox, DateTimePicker, ComboBox, .. ) don't have this behaviour. There, I can select the text as expected.
0
Accepted
Pavel R. Pavlov
Telerik team
answered on 05 Aug 2013, 01:45 PM
Hi Christian,

This behavior may be caused by the Theme that you use. If you are using the Windows8 theme you can try setting the HorizontalContentAlignment property to Stretch. Basically the definition of the control may look like this:

<telerik:RadMaskedTextInput SelectionOnFocus="SelectAll"
                   telerik:StyleManager.Theme="Windows8"
                   HorizontalContentAlignment="Stretch"
                   InputBehavior="Insert"
                   Mask="a10"
                   Width="200"/>
I hope this will help you.

Regards,
Pavel R. Pavlov
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
0
HAG
Top achievements
Rank 2
answered on 06 Aug 2013, 09:05 AM
That did it! :) (I was using Windows8 Theme)

Thank you!
Tags
MaskedInput (Numeric, DateTime, Text, Currency)
Asked by
HAG
Top achievements
Rank 2
Answers by
Pavel R. Pavlov
Telerik team
HAG
Top achievements
Rank 2
Share this question
or