Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to hide arrows on numericUpDown control in win forms?

Tags:

c#

winforms

to hide the arrows I have added numericUpDown.Controls[0].Hide(); and it hides the arrows but leaves white space when form is opened.

enter image description here

How to hide them to be like simple textBox?

like image 396
AYETY Avatar asked Apr 04 '15 19:04

AYETY


People also ask

How to hide the arrows in the numericupdown component?

You can hide the arrows by accessing the numericUpDown's Controls property. You can either hide or remove them: You can do this right after IntializeComponent (). Show activity on this post.

How are values displayed in the Windows Forms numericupdown control?

You can configure how values are displayed in the Windows Forms NumericUpDown control. The DecimalPlaces property determines how many numbers appear after the decimal point; the default is 0. The ThousandsSeparator property determines whether a separator will be inserted between every three decimal digits; the default is false.

How do I hide the numeric up and down buttons?

There are two controls in the NumericUpDown control. One is the up down buttons and the second is an edit box. down buttons. Therefore you can hide them. See below: were. up down buttons used to be.

How to hide the arrows in a form?

to hide the arrows I have added numericUpDown.Controls [0].Hide (); and it hides the arrows but leaves white space when form is opened. How to hide them to be like simple textBox? Show activity on this post. You can hide the arrows by accessing the numericUpDown's Controls property. You can either hide or remove them:


2 Answers

You can use this code. This code show up&down controllers, but they dont work, you use this code in Form_Load

YourNumericName.Controls[0].Enabled= false;
like image 51
morteza Avatar answered Oct 20 '22 04:10

morteza


You can hide the arrows by accessing the numericUpDown's Controls property. You can either hide or remove them:

numericUpDown1.Controls[0].Visible = false;

or

numericUpDown1.Controls.RemoveAt(0);

You can do this right after IntializeComponent().

like image 35
user3750325 Avatar answered Oct 20 '22 04:10

user3750325