NNumericUpDown hiding up/down arrows or make them larger


https://www.nevron.com/Forum/Topic7379.aspx
Print Topic | Close Window

By Lou Laskey - 11 Years Ago

When using the NNumericUpDown control on a touch screen, the arrows are not that easy for customers to use even by setting a large font. 

To get around this in the library I am replacing, the numeric control included a property to hide the arrows and I included it in a user control that had arrow buttons of my design.

Yes I could make a user control with a text box and intercept the keys etc to keep the numeric format but I would prefer to use what's already available (if it is) including the numeric formatting.

Any ideas would be appreciated.

TIA,

Lou

By Lou Laskey - 11 Years Ago

Solved.

After some research I took my User Control (SINumericNev) and replaced the numeric control with a NNumericUpDown (I called it numValue).

My control now has 3 controls on it: the NNumericUpDown and an Increment and Decrement button and used the following code:

public SINumericNev()

{

InitializeComponent();

this.numValue.Controls[0].Visible = false;

}

Along with all the supporting events and properties I exposed.  It is mush easier to use on a touch than either the Nevron or MS numeric control.

 

By Nevron Support - 11 Years Ago
Hello Lou,

Searching for an answer to your question, I saw that NumericUpDown control (NNumericUpDown is a subclass of NumericUpDown) has internally set the width of up/down button to a constant value, which cannot be changed.