hi, i have 3 ultradatetime controls on my Windows form. when i jump with the tab key from one to the other datetimecontrol the Shown date will not selected. often i see only the Cursor in the datefield
Hello Martin,
This is expected behavior. Each UltraDateTimeEditor records the caret position and the selection, if any, when you leave the editor or when it loses focus. When it gains focus again it puts the caret where it was and selects the same part of text. If what you need is to select all the text, when UltraDateTimeEditor gains focus you may handle Enter event. In the event handler call SelectAll method. You may use code like this:
private void UltraDateTimeEditor_Enter(object sender, EventArgs e){ // Cast the sender var ultraDateTimeEditor = sender as UltraDateTimeEditor;
// Return if something is wrong if(ultraDateTimeEditor == null) { return; }
// Call SelectAll to select the entire text of the editor ultraDateTimeEditor.SelectAll();}
Please let me know if you have any additional questions on this matter.