Masked TextBox .Net 2.0
-
When you place the Masked Textbox on form and set the Mask property, text box shows the preview of masked format. e.g. if user has selected integer with 5 digit as mask then Mask Textbox will display the text as"_____" in the text box. At the runtime also user will see "_____" as text in the textbox, until any value is entered. If user enters one digit(say "1") then text in the text box will look like "1____". So dynamically user is guided about the possible formatting and value which user can key in. If I don't want to use the masked text box and i make a control derived from text box how this dynamic preview like masked text box can be implemented? I request people to look at the functioning of the Masked textbox once for better idea of what I'm looking for. Pls come up with your ideas.
-
When you place the Masked Textbox on form and set the Mask property, text box shows the preview of masked format. e.g. if user has selected integer with 5 digit as mask then Mask Textbox will display the text as"_____" in the text box. At the runtime also user will see "_____" as text in the textbox, until any value is entered. If user enters one digit(say "1") then text in the text box will look like "1____". So dynamically user is guided about the possible formatting and value which user can key in. If I don't want to use the masked text box and i make a control derived from text box how this dynamic preview like masked text box can be implemented? I request people to look at the functioning of the Masked textbox once for better idea of what I'm looking for. Pls come up with your ideas.
Create a new control that inherits from MaskedTextBox.
I think I'm going to call my next project "Chuck Norris". It's a sure way to guarantee it's unbreakable.
• • •
But fortunately we have the nanny-state politicians who can step in to protect us poor stupid consumers, most of whom would not know a JVM from a frozen chicken. Bruce Pierson
-
Create a new control that inherits from MaskedTextBox.
I think I'm going to call my next project "Chuck Norris". It's a sure way to guarantee it's unbreakable.
• • •
But fortunately we have the nanny-state politicians who can step in to protect us poor stupid consumers, most of whom would not know a JVM from a frozen chicken. Bruce Pierson
Dave, Thanks for your reply. But solution suggested by you is not the one I'm looking at. I need to develope the things considering that I'm developing on framework 1.1 and Masked Textbox object doesn't exist at all. At the most I can derive my custome control from TextBox only. I just need some ideas from members. Thanks.
-
Dave, Thanks for your reply. But solution suggested by you is not the one I'm looking at. I need to develope the things considering that I'm developing on framework 1.1 and Masked Textbox object doesn't exist at all. At the most I can derive my custome control from TextBox only. I just need some ideas from members. Thanks.
KrunalC wrote:
At the most I can derive my custome control from TextBox only.
I think you've just answered your own question. Have a look at this[^] and this[^]. I think you should get a few ideas from the results on the first link.
I think I'm going to call my next project "Chuck Norris". It's a sure way to guarantee it's unbreakable.
• • •
But fortunately we have the nanny-state politicians who can step in to protect us poor stupid consumers, most of whom would not know a JVM from a frozen chicken. Bruce Pierson
-
KrunalC wrote:
At the most I can derive my custome control from TextBox only.
I think you've just answered your own question. Have a look at this[^] and this[^]. I think you should get a few ideas from the results on the first link.
I think I'm going to call my next project "Chuck Norris". It's a sure way to guarantee it's unbreakable.
• • •
But fortunately we have the nanny-state politicians who can step in to protect us poor stupid consumers, most of whom would not know a JVM from a frozen chicken. Bruce Pierson
I went through the links suggested by you but not to much help. If I simply derive from Text bok then lot of effort will be required to bring it to the level of masked textbox. Need to override onpaint, handle keypress n other events n will require lot of testing efforts. Confused regarding what to do?:zzz:
-
I went through the links suggested by you but not to much help. If I simply derive from Text bok then lot of effort will be required to bring it to the level of masked textbox. Need to override onpaint, handle keypress n other events n will require lot of testing efforts. Confused regarding what to do?:zzz:
It's not that much effort. Still, no pain = no gain. Think of it as a learning curve, it'll do you good. The other option is to use one of the VS Express editions or buy VS 2005.
I think I'm going to call my next project "Chuck Norris". It's a sure way to guarantee it's unbreakable.
• • •
But fortunately we have the nanny-state politicians who can step in to protect us poor stupid consumers, most of whom would not know a JVM from a frozen chicken. Bruce Pierson