Questions tagged [numericupdown]

NumericUpDown is a WPF/WinForm control that represents a numeric textbox that can be increased or decreased in value. With many properties and event handlers, the NumericUpDown control is ideal for user interfaces where a number is entered or adjusted.

271 questions
361
votes
32 answers

How do I get a TextBox to only accept numeric input in WPF?

I'm looking to accept digits and the decimal point, but no sign. I've looked at samples using the NumericUpDown control for Windows Forms, and this sample of a NumericUpDown custom control from Microsoft. But so far it seems like NumericUpDown…
Giffyguy
  • 17,946
  • 30
  • 81
  • 147
131
votes
14 answers

Where is the WPF Numeric UpDown control?

Getting into the first serious WPF project. It seems like there are a lot of basic controls flat out missing. Specifically, I am looking for the Numeric UpDown control. Was there an out of band release that I missed? Really don't feel like…
AngryHacker
  • 54,471
  • 90
  • 289
  • 523
103
votes
4 answers

Good NumericUpDown equivalent in WPF?

I'm looking for a simple NumericUpDown (a.k.a. number spinner) control in WPF. This seems to be another lacking control in WPF. There must be some existing ones out there and I don't like to re-invent the wheel.
devios1
  • 33,997
  • 43
  • 149
  • 241
61
votes
7 answers

How to select all text in Winforms NumericUpDown upon tab in?

When the user tabs into my NumericUpDown I would like all text to be selected. Is this possible?
Aidan Ryan
  • 10,791
  • 12
  • 49
  • 84
17
votes
5 answers

Android having NumericUpDown Button?

I've tried to find the NumericUpDown button in Android, but failed. Do you know what the controller is called in Android - please let me know!
Benny Skogberg
  • 9,531
  • 11
  • 47
  • 81
15
votes
4 answers

Having text inside NumericUpDown control, after the number

Is it possible in WinForms to show a text inside a NumericUpDown control? For example I want to show the value in my numericupdown control is micro ampers so it should be like "1 uA". Thanks.
Saeid Yazdani
  • 12,365
  • 48
  • 158
  • 270
13
votes
8 answers

Java: Format number in millions

Is there a way to use DecimalFormat (or some other standard formatter) to format numbers like this: 1,000,000 => 1.00M 1,234,567 => 1.23M 1,234,567,890 => 1234.57M Basically dividing some number by 1 million, keeping 2 decimal places, and…
Outlaw Programmer
  • 9,617
  • 8
  • 41
  • 60
9
votes
7 answers

Numericupdown mousewheel event increases decimal more than one increment

I'm trying to override the mousewheel control so that when the mouse wheel is moved up or down it only increases the value in the numericupdown field by 1. I believe it is currently using what is stored in the control panel and…
JonF
  • 2,109
  • 5
  • 33
  • 54
9
votes
1 answer

TextChanged Event of NumericUpDown

I am using Microsoft Visual C# 2010 Express. When i change the value of numericUpDown using arrows, my button becomes enable. But i also want to enable my button when i change the value of numericUpDown by changing the text directly. I am using the…
Lany
  • 133
  • 2
  • 12
9
votes
1 answer

numeric up down control in vba

Is there an in-built numeric updown control in vba or do we need to create a control like that? If there is such a control then what are the events that we may use. Pls suggest.
Premanshu
  • 606
  • 2
  • 13
  • 22
8
votes
2 answers

How to make NumericUpDown ReadOnly

I would like to make WinForms NumericUpDown control non-editable or at least spin control should be disabled. I tried setting the control readonly but using mouse scroll values are changing. Please help me to achieve this.
Shilpa
  • 362
  • 2
  • 12
7
votes
5 answers

Display `00` instead of `0` in a NumericUpDown control

I'm letting users select a date/time for a scheduled task to run, using two NumericUpDowncontrols. I'd like one-digit values to be padded with a leading 0, so as to display 09:00 instead of 9:0.
Clément
  • 10,212
  • 13
  • 62
  • 104
7
votes
3 answers

NumericUpDown: accept both comma and dot as decimal separator

There's a way to force c# NumericUpDown to accept both comma and dot, to separate decimal values? I've customized a textbox to do it (practically replacing dots with commas), but I'm surprised that there isn't another way.. This question explains…
T30
  • 9,099
  • 5
  • 42
  • 56
7
votes
1 answer

How to display an empty value in NumericUpDown control?

I have a Windows Forms application that includes NumericUpDown control With Minimum and Maximum values set to (50:80) accordingly and step 1. When form loads the NumericUpDown shows 50. I know that NumericUpDown is for picking numbers and numeric…
user3123337
  • 81
  • 1
  • 1
  • 3
7
votes
1 answer

NumericUpDown ValueChanged event with immediate consequences?

I'm writing a small application in C# (.NET 4.0). I want to fire an event when value changes in numericUpDown, but it seems that numericUpDown ValueChanged fires when control loses focus or when there are multiple changes. Long description: I am…
Ben
  • 2,395
  • 5
  • 41
  • 56
1
2 3
18 19