Tae-Sung Shin
Tae-Sung Shin

Reputation: 20643

NumericUpDown for touchscreen application

I am modifying a Winform application with touchscreen interface. It has a lot of NumericUpDown controls with large font sizes in GUI. But the each control still has tiny up/down arrow for a finger. Is there any way to make the arrow bigger? Or Any way for the arrows to be aligned column-wise?

Upvotes: 1

Views: 3702

Answers (2)

LMK
LMK

Reputation: 1561

I just had the same problem, touch-screen application. A bit of digging in ILSpy gets you the field that you can set via reflection. Of course comes with the caveat that MS could change the implementation at any time:

var field = typeof(NumericUpDown).GetField("defaultButtonsWidth", System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Instance);
field.SetValue(nudMyNumericUpDown, 30);

Upvotes: 0

user27414
user27414

Reputation:

You could easily create a composite user control consisting of a numeric up down (with no buttons) and two buttons. This would give you full control over the appearance, and really wouldn't add much complexity.

Upvotes: 5

Related Questions