This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
Using your library's MaskedTextBox, is it possible to create a mask for
a URI (that would accept all types of URIs)? Acceptable input would
basically just be a variable-length string of alphabetic characters, followed by a colon, followed by some more characters. The underlying question here is: does the MaskedTextBox.Mask property allow me to specify a variable length string as part of it? If this is possible, then what would the Mask string for a URI look like?
|
|
|
I'm afraid the the mask engine doesn't support variable-length strings. Sorry. (One thing we have thought about is supporting a regular expression-based mask engine, which would easily handle variable-length strings, but the problem with that is that it makes it hard to provide user feedback on the input that would be acceptable.) One thing you could consider is using a large number of optional characters (the C symbol) -- if users are typing the URIs then I would imagine there is probably a predictable upper bound on their length. I am not sure how well this would work though (and it's certainly not elegant!). |
|