When I tab into a textbox, all the contents are highlighted so immediately typing just overwrites what's there and that's what we want. The same thing does NOT happen with a Numeric Editor. How can I make the numeric editor behave JUST like a textbox.
1) Tabbing into a textbox pre highlights all the contents
2) Clicking into a textbox does NOT highlight everything and appropriately sets the cursor caret.
You can subscribe to the Enter or BeforeEnterEditMode events in the NumericEditor, and in the event handler method call the SelectAll() method on the control:
OnLoad(){ UltraNumericEditor numericEditor; numericEditor.BeforeEnterEditMode += OnNumericEditorBeforeEnterEditMode; }private void OnNumericEditorBeforeEnterEditMode(object sender, CancelEventArgs args){ UltraNumericEditor tempNumEdit = sender as UltraNumericEditor; if(tempNumEdit != null) { tempNumEdit.SelectAll(); }}
It should work as you want.
Hope it helps,
Emanuel
I've tried this solution but it doesn't work!
Have you checked that the method is called? Maybe the event is not fired, or maybe you have not set any event handler.
The way I have described above works very well for me in NetAdvantage 8.1.
This same question is answered in this other thread.