Coding :
private void txt_PreviewTextInput(object sender, TextCompositionEventArgs e) { e.Handled = !ValidNumeric(e.Text); base.OnPreviewTextInput(e); } bool ValidNumeric(string str) { bool ret = true; int l = str.Length; for (int i = 0; i < l; i++) { char ch = str[i]; ret &= Char.IsDigit(ch); } return ret; }
Thanks dedjo
Popularity: 5% [?]
Related posts:

September 28th, 2009
joy
Posted in
Tags: 

Thanks for that! lol… so I’m still wondering what you concept for the post I produced last week, you by no means did comment on it??