Reputation:
I'm not very experienced with .NET development, so forgive me if I've missed something obvious.
My scenario is quite simple: my program is going to deal with both the Imperial and Metric systems of measurement. I need an input control that will be able to elegantly house {feet, inches} and {meters, centimeters} (only one set at a time).
From what I've seen in VC#'s Control Toolbox (Winforms .NETF 3.5), I'm looking for a mix of MaskedTextBox
, NumericUpDown
, and DateTimePicker
.
Namely:
MaskedTextBox
's ability of filtering user inputNumericUpDown
's ability of [in/de]crementing the user-selected [sub-]unit of measurementDateTimePicker
's ability of "breaking apart" information in a single control. I'm specifically interested in breaking apart say feet and inches while still displaying them on the same controlI should also point out that I'm most interested in replicating DateTimePicker
's ability to keep separate pieces of input in a single control.
I would greatly appreciate your thoughts as to what base control I should sub-class in order to achieve this functionality.
Cheers!
Upvotes: 2
Views: 1154
Reputation: 300559
Have you looked at this code project article which might be a starting point.
Upvotes: 1
Reputation: 11395
I think DateTimePicker isnt enough flexible to make that.
You should create a composite user control. The main control should contain:
Or yoou can search on CodeProject or Codeplex for opensource, and Telerik and DevX for shareware components.
Upvotes: 0