Form

GPALNumericUpDown

Everything on Settings Every Control Takes applies here too. GPAL.NumericUpDown builds one. WithMinimum and WithMaximum bound what can be entered, WithValue sets the starting number, WithIncrement how far one click of an arrow moves it, and WithDecimalPlaces how many decimals are shown, where zero makes it whole numbers. ValueChanged is the primary event. GPAL.NumericUpDownFor(minimum, maximum) is the shorthand.

NOTE

Value reads the control as it stands, so it reflects every spin and every typed edit. WithValue sets what it starts on. Before the form is shown there is no control to read and Value gives back the starting value.

Examples

GPAL Fluent: High-level fluent C# API

//Set the range before the value: a value outside the minimum and maximum is clamped to them.

GPALNumericUpDown retries = (GPALNumericUpDown)GPAL.NumericUpDown

.WithMinimum(0)

.WithMaximum(10)

.WithValue(3)

.WithIncrement(1)

.WithDecimalPlaces(0)

.WithName("retries");

💬 Ask GPAL