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 Stephane,
If it's not a MaskedEdit, then what control is it?
It is simply a UltraTextEditor, I think it's possible to have this behavior with this control.. thank you for your answer...
Is there a way to do the same with the UltraNumericEditor?
private void ultraFormattedTextEditor1_Enter(object sender, EventArgs e) { UltraFormattedTextEditor ultraFormattedTextEditor = (UltraFormattedTextEditor)sender; ultraFormattedTextEditor.EditInfo.SelectAll(); }
Can you give us an example?
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.
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