Re: NumericUpDown by John
John
Thu Jul 17 09:48:27 CDT 2008
Not sure if I completely understand your question, but:
private void numericUpDown1_ValueChanged(object sender,
EventArgs e)
{
if (this.numericUpDown1.Value > 5)
{
MessageBox.Show("Value cannot be greater than 5");
this.numericUpDown1.Value = 5;
}
}
Seems to work fine for me.
"Peter Morris" <mrpmorrisNO@SPAMgmail.com> wrote in message
news:O$TCOWB6IHA.5108@TK2MSFTNGP06.phx.gbl:
> I need to change the behaviour of NumericUpDown (compact framework 2.0) so
> that I can show a dialog stating that the value is not within the allowed
> range rather than just capping the input value. Any ideas how I can achieve
> this? I don't seem able to find a suitable place to hook into (pre
> set-value).
>
>
> Thanks
>
>
> Pete