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?
Try this thread:
Select text when tabbing in MaskedEdit - Infragistics Forums
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;