I've got a combo box that I want to allow users to enter in numerical digits, but not allow them to enter alphabetical characters.
My problem is that these numbers can be decimal so I need to allow the user to enter .
I've used char.IsSymbol
but it doesn't seem to do what I want it to do.
private void DaySelection_ComboBox_KeyPress(object sender, KeyPressEventArgs e)
{
if (!char.IsControl(e.KeyChar) && !char.IsDigit(e.KeyChar) && !char.IsSymbol(e.KeyChar))
{
e.Handled = true;
}
}