How can I set the textbox to accept something of a given format like 'HH:mm' (12:22).

I belive that some API could solve it, but I can't find out how to do it.

TIA
Svein