(Related to Q105658)
I've to develop a control that implementing the following functional requirements:
1. User experience while editing should be same to DateEdit and TimeEdit controls
2. It must support editing TimeSpan value in two formats:
* days.hours:minutes:seconds.fractions -- where hours, minutes, seconds and fractions are usual DateTime masks and days is a number limited by range [0 - MaxValue]
* hours:minutes:seconds.fractions -- where minutes, seconds and fractions are usual DateTime masks and hours is a number limited by range [0 - MaxValue]
3. All other ways defining the mask should be hidden from user
4. The control should support XtraGrid as well
Since there is no "Developer Manual" about how to implement a user control from base classes (or at least i didn't find one) I've figured out two items:
* I've to inherit from the BaseSpinEdit
* I've to implement my own MaskManager
I'll appreciate getting a list of what i have to implement / extend with emphasises on important methods, properties and events, so i can construct a custom control fully complying with DevExpress XtraEditors package.
Sincerely yours, Leo
Unfortunately, we don't have a sample with the editor inherited from the BaseSpinEdit control. However, you can use the sources of the SpinEdit class as a sample. A common approach to creating a custom editor is described in the How to register a custom editor for use in the XtraGrid article.
The sample on how to create your own mask manager is given in the How to auto-complete the text being entered with a custom string article.
Thank you for your answer.
Unfortunatly, code examples of the SpinEdit and (even more relevant) DateEdit as well as TimeEdit hints that one of the major tasks will be implementing MaskManager class. Since neither of its abstract methods is documented, it is really hard to understand what should do each of its methods. If you don't have any manual, reference or code samples then write a sentence or two for each abstract methods of the MaskManager. I hope it will be enough. Regarding unclear moments I will ask a separate question.
Thank you, Leo.
Sorry, but we don't have a description of the methods of the MaskManager class. I believe that the best way to understand how they work is to see how they are implemented in our editors. I also recommend that you refer to the MaskManagerCommon issue that contains a sample of implementing the custom MaskManager by our customer Simon Hewitt. Please feel free to ask us if you have any difficulties while implementing a particular method.
Is your intention to post an answer to your own question?
- If so, then proceed.
- If you simply wanted to post additional information, ask for further clarification, or to just say "Thanks!", please click Leave a Comment.
- If you wish to edit your original question, please use the Edit button in the Toolbox at the top right corner of that entry.