308 questions
0
votes
0
answers
13
views
flickering in a panel with Numericupdown and autoscroll
I have a C# Winform application.
In the form of this application, I have a panel with AutoScroll=true and DoubleBuffered=true.
The form containing the panel has DoubleBuffered=true.
Inside the panel, ...
0
votes
1
answer
39
views
NumericUpDown with UpdateEditText()
I need to set two numericupdown controls to set two numbers with the following format:
One with 000001 format
The other with 001 format
I've found the UpdateTextEdit() control on MS Support page but ...
0
votes
1
answer
109
views
NumericUpDown getting reset to minimum value when clicked
I have NumericeUpdown embedded inside an EditingListView column in a Windows desktop application. The ListView will show decimal value as text and when clicked, the NumericUpDown should be visible ...
0
votes
0
answers
95
views
Windows Forms numericUpDown control does not update BindingSource
I have a numericUpDown control bound to a binding source. The bindingsource has a datasource that is a binding list of entities queried using Entity Framework.
_context.Tasks.Load();
_bindingSource....
0
votes
0
answers
49
views
NumericUpDown Control input doesn't appear after losing focus but value stays the old value
During the using of NumericUpDown control in Framework 4.8 version I tent to delete the value inside NumericUpDown control. After leaving the value deleted and empty, the value stays the last input ...
0
votes
1
answer
67
views
Cancel Key before it is shown in NumericUpDown
When I type a key inside a NumericUpDown, it is shown even if I cancel it, no matter which Key event I put it into.
I tried cancelling the key in all those events:
events
It does cancel but I always ...
1
vote
1
answer
75
views
Value returned after numericUpDown1 value exceeds the maximum range (C# Windows Form)
I set a minimum value of 1 and maximum of 10 for my "numericUpDown1". (C# Windows Form)
When I enter the value 0 manually from the keyboard, "numericUpDown1" automatically ...
0
votes
0
answers
247
views
Conversion from Lat Long to MGRS is working but not the other way around C#
I'm using CoordinateSharp package to convert my coordinates. When I want to convert from Lat Long to MGRS it works, even editing my lat long numericupdown box updates the MGRS to the correct value, ...
1
vote
1
answer
142
views
Display the default value in the newly added row (DataGridView)
There is a custom NumericUpDownColumn:
Module NumUpDownModule
Public defRowValue As String = "0"
End Module
Public Class NumericUpDownColumn
Inherits DataGridViewColumn
Public ...
3
votes
2
answers
2k
views
How do I style an Avalonia NumericUpDown control integer-only?
Every time I click the Up or Down button of an Avalonia NumericUpDown control a period with a zero gets added to the value, i.e. it increases as 2.0, 3.0, 4.0 etc. instead of 2, 3, 4 (which would be ...
0
votes
2
answers
57
views
numericUpDown used with return values
I am pretty new to c#, I am taking a class and we didn't cover numericUpDown at all. I am creating a basic dice roller for a project and have the basics laid out, however I can't seem to figure out ...
0
votes
1
answer
100
views
How to Increase or Decrease decimal places in datagridview cells using a NumericUpDown control?
Basically I have a datagridview, some rows contain text and the other rows contain decimal with roughly 7 decimal points, and I would like to use NumericUpDown control to reduce or increase the ...
1
vote
2
answers
150
views
NumericUpDown with different increment values
I have a C# WinForm application where I want to implement a NumericUpDown component that increments / decrements its value depending whether or not the control key is pressed on clicking to the arrow ...
0
votes
0
answers
24
views
How to search for matches from an array of pairs for a certain number of rows in a ListBox?
enter image description hereI want to write a program to analyze the lottery. I want to implement Visual Basic.NET in ListBox. The base of circulations in ListBox will look like this:
1344 - 03 34 12 ...
0
votes
0
answers
50
views
C# Assigning numericUpDown value to a specific cell in Excel file
Heres what I have:
if (int.TryParse(kit_csv_quantity.Text, out int kitOut))
{
decimal kitOutValue = kitOut + kits_upDown.Value;
kit_csv_quantity.Text = ...
0
votes
2
answers
439
views
How to give padding(all sides) to a value inside NumericUpDown Control in Winforms
I am stuck with this problem of giving padding to all sides to a value inside NumericUpDown control in Winforms.
Apparently no one has asked this before.
Actual how control is looking: (https://i....
0
votes
0
answers
253
views
Custom DataGridView NumericUpDown editing control
Follow-on from question here : How to assign typical NumericUpDown properties to custom NumericUpDown based control?
I'm trying to do something similar to this scenario but I don't want / need an ...
0
votes
1
answer
167
views
C# Windows Forms Application: Change behavior of all instances of a control
I would like to change the increment values and decimal places for all of my numeric updowns.
I know I can do this individually with
numericUpDownName.DecimalPlaces = 2; and numericUpDownName....
1
vote
1
answer
319
views
Winform numericUpDown have different delay for up and down value change
I have just started studying .Net Winform with C# (.Net 5). I did a simple winform with a NumericUpDown and a ProgressBar, basically, the ProgressBar will update its value when the NumericUpDown's ...
1
vote
1
answer
784
views
Custom C# Windows Forms NumericUpDown in DataGridView Not Working
I am attempting to embed a custom NumericUpDown that includes a leading/trailing string/char (e.g. "%" or "$") in the NumericUpDown textbox inside of a C# DataGridView. In other ...
0
votes
1
answer
45
views
how to stop user adding number to NumericUpDown after it reach a vlaue
I have 10 NumericUpDowns. I want them when to reach the limit of 14 and then the last NumericUpDown the user clicked only can be decreased or stay the same after the msgbox display, I set the limit to ...
1
vote
1
answer
946
views
How to cancel the ValueChanged event for NumericUpDown controls?
Under certain conditions I'd like to cancel the ValueChanged event of a NumericUpDown control in Winforms (e.g. when the value set in the control is too high in relation to another value in a TextBox)....
1
vote
2
answers
1k
views
NumericUpDown ValueChanged event not firing while typing
I have a bound NumericUpDown control.
I want the ValueChanged Event to fire when either the up or down arrow is clicked or if the user changes the number.
When the up or down arrow is clicked the ...
3
votes
3
answers
1k
views
c# Numericupdown textbox not showing value if i set it to minimum after resetting text
This code doesn't work if i set the value of the textbox to 1, with a minimum of 1.
numStartChannel.Minimum = 1;
numStartChannel.ResetText();
numStartChannel.Value = 1;
The control actually has the ...
0
votes
1
answer
83
views
How to hide UpDown buttons in Inactive cells for DataGridView NumericUpDownColumn
Thanks in advance...
I am a VB coder with limited C# experience. I am trying to implement the MSDN C# solution for adding a NumericUpDown column to a DataGridView from here. It works fine except that ...
3
votes
1
answer
185
views
How to swap arrow buttons functionality on NumericUpDown control?
I want to swap the Up and Down arrows (functionality only, not the actual arrows) on NumericUpDown control. For example on clicking the UP arrow the value should decrease and similarly on clicking the ...
0
votes
2
answers
178
views
How do I make a textfile string convert to an integer and display in a numericUpDown in C#
I am making a program that is a golf scorecard. There is a text file for the selected course they choose and when they click a button I want the program to display the previous round to numericUpDowns ...
0
votes
1
answer
825
views
UpDown control that disables up or down button when limit is reached
My question is based on one of the answer to this post:
Where is the WPF Numeric UpDown control?
answered by Mr. Squirrel.Downy.
What i would like to accomplish is a numeric updown control that ...
-1
votes
1
answer
753
views
How to get text of NumericUpDown before valuechanged event?
I want to make it work this way: when I write to NumericUpDown 1k the value should be 1000, when I write 4M the value should be 4000000. How can I make it?
I tried this:
private void ...
-1
votes
1
answer
80
views
How depending the selected value of a combobox, i can allow in a numericupdown the value to be >= 0?
Example
I have a combobox with a list of 3: entry, exit and transfer and a numericupdown called: txtTotal that starts in 0
when i select entry or exit should show error missing total but if a select ...
0
votes
2
answers
477
views
How to retain the value from an numericupdown after closing a form
I have the following question. I am using C# .NET, and I want to save a value in numericupdown box after I close my form. In my aplication I have in total 2 forms, so I want to save the value I enter ...
0
votes
1
answer
267
views
Increment/Decrement value from NumericUpDown
I have the following problem. I create a form with two NumericUpDown and I want to increment/decrement the value from them by 0.01. I tried to use NumericUpDownObject.Increment=0.01M, but there is no ...
0
votes
1
answer
97
views
Handle user number input value condition with ReadOnly false of numericUpDown
In C# WinForms desktop application I use 2 interdependent numericUpDown1 min and numericUpDown2 max value numericUpDown controls:
private void numericUpDown1_ValueChanged(object sender, EventArgs e)
{...
0
votes
0
answers
367
views
Restrict the number of digits in NumericUpDown Control
I am using a NumericUpDown in WinForms and I'm wondering if it is possible to restrict the number of digits. So my max value is set to 9999.99 but you can enter values larger than this. you shouldn't ...
-3
votes
3
answers
357
views
For Loop will not Create New Textboxes in a C# Windows Forms Application
I was intending to have this create as many textboxes as the value of numericUpDown1, and I'm going to make some tweaks so that it also deletes textboxes when the value is lowered, but it is not ...
0
votes
0
answers
72
views
NumericUpDown base location moves if visibility is toggled during a scroll
I'm working on a school project for a restaurant menu. I have my menu items in a TabControl based on type (main course, salads, deserts, and beverages). The main course menu has lots of items and it ...
2
votes
1
answer
264
views
How can I use the value of the ComboBox to multiply with the NumericUpDown in C#?
I need help on how can I compute for the Basic Pay which is the Rate/Day * No. of days worked.
How can I get the values of every position code so that I can multiply it to the No. of Days Worked.
For ...
0
votes
1
answer
256
views
Why the UpdateSourceTrigger=Propertychanged dose not work correctly in IntegerUpdown?
My question is based on How to set a restriction to WPF IntegerUpDown toolkit? that I've posted a while ago.
I have two WPF IntegerUpdown controls, one represents the maximum number and the other ...
1
vote
2
answers
341
views
NumericUpDown that only allows a range of values of the power of two
I have a NumericUpDown whose minimum value is set to 1 and its maximum is 64. I have to increment it, from 1 to 64, using the values of the power of 2, so it must be 1, 2, 4, 8, 16, 32, 64.
I've tried ...
-1
votes
1
answer
225
views
Show error when C# numericUpDown is being changed to a value less than it's minimum value
I have a numericUpDown in my C#.NET windows form and I have set it's minimum value to 5. Now I can't go below 5 using the numericUpDown button. But I also want to show an error message if user tries ...
3
votes
2
answers
3k
views
Change Border Color of NumericUpDown
I am very new to C#, and have a question. I have been able to change the border colors of buttons and such by changing their FlatStyle to "Flat". With the NumericUpDown, I can't change the ...
0
votes
0
answers
293
views
NumericUpDown rejects value
I've got issues with NumericUpDown control. When I try to input a value, the control seems to reject it, despite the value being well withing Minimum and Maximum.
numericField.Hexadecimal = true
...
-1
votes
1
answer
386
views
Set limit ListBox items by NumericUpDown C#
I'm developing a WinForms application in C# that by an ADD button adds elements to a listBox.
What I need to do is set an items limit to this listBox with the NumericUpDown element while the app is ...
2
votes
2
answers
2k
views
NumericUpDown custom increment using default Buttons
I have a NumericUpDown control with increment of 5. Entering 1 using the keyboard is possible and shall always be possible.
But when I click the Up-button I want not to have a 6 but a 5, always 5, 10, ...
2
votes
2
answers
969
views
How do I get the value from an NumericUpDown in c++?
I've been trying out the windows forms for a small project of mine where the program calculates the contents of different amounts of food.
I figured the NumericUpDowns would be a good way to get ...
1
vote
2
answers
2k
views
How To Display "0000" instead "0" in NumericUpDown in C#
I want to take 4-digit value from Users using numericUpDown. So, I want to set up "0000" instead "0" to remember them to enter 4-digit.
I am programming WinForm With C#.
I am ...
1
vote
2
answers
670
views
How to differentiate mouse events for NumericUpDown controls edit box and arrow buttons
There are two controls in the NumericUpDown control.One is the up down buttons and the second is an edit box.Position zero of the NumericUpDown collection of it's controls is the up down buttons....
2
votes
2
answers
184
views
Exception swallow in WinForm Application c#
public partial class Form1 : Form
{
public class abc
{
public static decimal Divide(int a,int b)
{
return a / b;
}
}
...
0
votes
3
answers
818
views
How to check if the Value of a NumericUpDown is larger than the Year value of a DateTimePicker?
I currently have a NumericUpDown where users input the number of years they have been at a site.
I then have a DateTimePicker for a DOB field: I want to make sure that the Value specified in the ...
0
votes
0
answers
178
views
Numericupdown arrows turning black when form is minimized
I am using a numericupdown in my form, but I don't need the arrows, so I hide them on the form load event, it works fine, but when I minimize the form and maximize it again they turn black
private ...