I'm using the UltrNumericEditor control on a form, but all the text is not selected when I tab into or click into the control. Does anyone know how I can get it to select all of the text when the user tabs into it or clicks into it with them mouse?
This same code is called when the cotrol is clicked, however, the text in the control is not being highlighted like it is when you tab into the control. Please explain why I'm getting different results from the same piece of code?
Do you know how I can highlight the text in the editor control when the user clicks into it for the first time? i.e. the control does not have focus and the user clicks.
I don't think there is a property, no.
You can Submit a feature request to Infragistics
Mike,
I created the following event handler for highlighting the text when the user tabs into the control. I created another event handler for the MouseDobubleClick event that makes a call the the same HighLightEditor text method. This solves the problem. Do you know if the control has a property to handle this? I think the control should be able to do this automatically.
{
this.HighlightEditorText(((UltraNumericEditor)sender).Editor);
}
private void HighlightEditorText(Infragistics.Win.EmbeddableEditorBase editor)
if (editor.Value != null) { string str = editor.Value.ToString(); editor.SelectionStart = editor.TextLength - str.Length; editor.SelectionLength = str.Length;
string str = editor.Value.ToString(); editor.SelectionStart = editor.TextLength - str.Length; editor.SelectionLength = str.Length;
editor.SelectionStart = editor.TextLength - str.Length;
editor.SelectionLength = str.Length;
Try this thread:
Select text when tabbing in MaskedEdit - Infragistics Forums