Adding text mask attribute to properties in PropertyGrid

I'm using a PropertyGrid in my application to allow the user to modify object entites in a file. I've created little wrapper classes to expose just the properties of the objects that I want exposed and in the way I want them exposed.

Some of the exposed properties are timecode esq things and I would like to limit the users input to a couple of formats. For example a timecode of 1 min could be entered in any of the following ways:

00:01:00.000
60.000S (meaning 60 seconds)
120F (meaning frame number 120 assuming 2 frames per second)

I'm sure that I could do this with a custome UITypeEditor but I'm wondering how I could create an attribute like PasswordPropertyTextAttribute (and the required infrastructure to support the attribute) so that the the normal text entry filed of the property grid can enforce the limited allowable character set of [0-9.:SsFf] and the allowable formats.

The atttribute route seems to be the way to go but if there is a better way I'm all ears.

I've searched high and low on the NET for how to do this and I've seen several people requesting this type of thing but no one seems to have the answer.

The PropertyGrid is so complex and extensible that it seems like this should be doable I just don't know how to start.

Thanks

Matt S.

[1351 byte] By [MattSchuckmann] at [2007-12-25]