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.

298 questions
410
votes
33 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
  • 20,378
  • 34
  • 97
  • 168
154
votes
16 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
  • 59,598
  • 102
  • 325
  • 594
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
  • 36,899
  • 45
  • 162
  • 260
70
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
  • 11,389
  • 13
  • 54
  • 86
17
votes
5 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.
Dumbo
  • 13,555
  • 54
  • 184
  • 288
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
  • 10,431
  • 11
  • 53
  • 83
14
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…
Tim Frey
  • 9,901
  • 9
  • 44
  • 60
13
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,336
  • 6
  • 38
  • 57
13
votes
3 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
  • 412
  • 3
  • 14
11
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
  • 153
  • 1
  • 2
  • 14
10
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
  • 616
  • 3
  • 14
  • 24
9
votes
6 answers

how do i restrict numericupdown control to accept only integers

I have a windows numericupdown control. I want to restrict it so that user can only enter integers in it. How do I do that? At present a user can enter a decimal number as well. Thanks PS I am using .net
umbersar
  • 1,821
  • 3
  • 24
  • 34
9
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
  • 101
  • 1
  • 1
  • 3
8
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
  • 12,299
  • 15
  • 75
  • 115
8
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,435
  • 6
  • 43
  • 57
1
2 3
19 20