NumericUpDown ValueChanged

  • Thread starter Thread starter davebythesea
  • Start date Start date
D

davebythesea

Hi,

I'm using a numericupdown in my app. The event ValueChanged fires when the
value is changed via the up down arrows. However, if I change the value by
editing the text directly, this event does not fire until I change focus to
another control.

Is it possible to disable the user from entering a value directly into the
numericupdown, and just confien them to using the up down arrows to change
the value?

Thanks again for any tips.
Dav
 
No this is not possible. You'd have to write your own control which wouldn't
be that difficult when using CF 2.0 or onwards. You could create a panel with
a text box then draw two custom buttons up and down arrow maybe use icons
here then you can control anything you like. This would be considered a
composite control.
 
No this is not possible. You'd have to write your own control which wouldn't
be that difficult when using CF 2.0 or onwards. You could create a panel with
a text box then draw two custom buttons up and down arrow maybe use icons
here then you can control anything you like. This would be considered a
composite control.

Hi,

If I understood your problem correctly, you want to disable direct
entry into edit box and force to use up/down buttons only.
You can set NumericUpDown.ReadOnly (Gets or sets a value indicating
whether the text can be changed by the use of the up or down buttons
only) property.
I am using .NET CF 3.5, not sure if this property available on older
CF.
Let me know if this is what you were looking for.

Thanks,
Jayesh Modha
 
Jayesh said:
Hi,

If I understood your problem correctly, you want to disable direct
entry into edit box and force to use up/down buttons only.
You can set NumericUpDown.ReadOnly (Gets or sets a value indicating
whether the text can be changed by the use of the up or down buttons
only) property.
I am using .NET CF 3.5, not sure if this property available on older
CF.
Let me know if this is what you were looking for.

Thanks,
Jayesh Modha

That was exactly what I was looking for!

Thank you both for your replies.

David
 
Back
Top