I've been trying to implement a custom control much like the standard Winform DateTimePicker control.. only that I need my control to display architectural length values in feet and inches.. like 9'-6".. the control should work in this way..
- A single up-down spin button should be visible on the right side of the control..
- The control should have 2 subfields, one for feet and one for inches.. the fields should not be individual
TextBoxes with their own borders.. - When no value has been associated with the control, it should display a ghost text string in grey color "Specify a length"..
- When the control is clicked it should display ?'-?", if the user clicks away without entering any length, the ghost text should be displayed again..
- Only the subfields should be selectable when clicked.. and the updown spin button only changes the currently selected subfield..
- The inches subfield should increment and decrement in units of 3, and wrap around its range of 0 to 11..
I think all of the functionality exist somewhere (or can be overridden) in the standard DateTimePicker control with the exception of ghost text requirement.. so probably what I should be asking is how exactly does the DateTimePicker actually work? How can I replicate its appearance and behaviour..?
I've looked around on Google and stackoverflow a lot but havent come across a similar question or answer..
EDIT 01:
I think a combination of updownbase and maskedtextbox might be what I need to work with.. but I have no idea how.. for one.. the maskedtextbox does not select subfields when clicked.. also how to get the updownbase to work with the currently selected subfield in the maskedtextbox..


