Hi there,
I am using several controls in a dialog. When I am tabbing through UltraTextEditors the whole text in the control is selected when I tab into it. When I use UltraMaskedEdit-Controls nothing is selected when I tab into the control. Is there a property I can set to change that behaviour?
In addition: The UltraMasedEdit is set to UseSpecifiedMask and the InputMask is nnnn
Thanks in advance,
Anja
Hi Anja,
It looks like the control remember what was selected the last time it lost focus. There's no property for this, but it's pretty easy to handle inside the Enter event:
private void ultraMaskedEdit1_Enter(object sender, EventArgs e) { UltraMaskedEdit ultraMaskedEdit = sender as UltraMaskedEdit; ultraMaskedEdit.SelectAll(); }
Hi,
I've tried your code sample in my application and unfortunately it doesn't work.
I have exactly take your sample and subscribe my text editor (not a masked edit one but I think both have same behavior for this action ^^) for the enter event: nothing's selected...
Maybe it comes with the Office 2007 style of my control but I hope I don't think so...
Thank you for your answer.
Stéphane
Hi Stéphane,
I'm confused. You started off in your very first post here saying that the UltraTextEditors select all the text and the MaskEdit controls do not. Now you are saying that the code I have here doesn't work for UltraTextEditor. But this code is unneccessary for UltraTextEditor. It already selects all of the text when you tab into it.
Mike,
I have an UltraFormattedTextEditor that needs the same sort of functionality. I turned off the tab stop on the control, so I will just need to make this happen when the user enters the control via mouse.
What would I put in the handler for the controls Enter event?
Patrick
Hi Patrick,
It's essentially the same, but I think the UltraFormattedTextEditor has it's Selection stuff on the EditInfo object instead of directly on the control.
Can you give us an example?
private void ultraFormattedTextEditor1_Enter(object sender, EventArgs e) { UltraFormattedTextEditor ultraFormattedTextEditor = (UltraFormattedTextEditor)sender; ultraFormattedTextEditor.EditInfo.SelectAll(); }
Is there a way to do the same with the UltraNumericEditor?