Quantcast
Channel: Windows Forms Data Controls and Databinding forum
Viewing all articles
Browse latest Browse all 2535

Only allow copy and paste the correct data

$
0
0

I know I asked this question already, but I need a more specific solution for my problem. I have many textboxes that only allow decimals or integers. I don't care how many numbers are in the textbox there can be a negative sign before it. You really can do whatever you want in that text box as long as it conforms to the rules of a decimal/integer. Therefore, I can't use a masked textbox which you must fill out the full amount of characters into the mask. It's too confining for what I need. Is there a way to either have a masked textbox with a regular expression as the mask or to have a regular textbox that does the same thing as a masked textbox for copying and pasting. I handled the keypress eventhandler but it doesn't help for copying and pasting. Any ideas?


Debra has a question


Viewing all articles
Browse latest Browse all 2535

Trending Articles