I have an UltraDateTimeEditor with a {time} mask, so it only displays hours and minutes.
When the use clicks on the minutes I would like to select the minutes section so he can click the up or down spin buttons and increment/decrement that section only. Samewise if the user clicks on hte hour I want to select only the hour section. Is there a way to do that?
Thanks,
Oscar.
Hi,
I'm not sure I understand your question. What you are describing is the default behavior of the control. It doesn't actually select the hour or minute section, it just places the caret where you click. But the arrow keys will modify the current section.
So... is the issue just that you need to select the text? Or are the arrow keys not working for you?
Thanks for the answer Mike,
As you say, the up/down arrows change the value of the section where the caret is located. What I want to do is select the text of the section when the user clicks it. For example, if the user clicks the minutes section I want the control to select both digits.
I noticed the contorl already does something similar when the TabNavigation property is set to NextSection. When you hit the tab key the next section is selected. I wonder if the control exposes all I need to do the same thing.
My first approach was inheriting from the UltraDateTimeEditor. That way I can have access to the UltraDateTimeEditor.DateTimeEditor. The Editor has a Sections collection, and that's where I get stuck. Is there a way to know the current Section? Given the Section, is there a way to tell the Editor "select the text of this section"?
Thanks in advance,