Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
34 views

Numeric Up Down AND Open Dialog

The document discusses the NumericUpDown control in .NET, which allows users to increment or decrement a numeric value using up and down arrows. It provides steps to create a NumericUpDown control by instantiating the NumericUpDown class, setting properties like minimum, maximum and increment values, and adding it to a form. Common properties and events of the control are also described.

Uploaded by

Ammar
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
34 views

Numeric Up Down AND Open Dialog

The document discusses the NumericUpDown control in .NET, which allows users to increment or decrement a numeric value using up and down arrows. It provides steps to create a NumericUpDown control by instantiating the NumericUpDown class, setting properties like minimum, maximum and increment values, and adding it to a form. Common properties and events of the control are also described.

Uploaded by

Ammar
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 10

NUMERIC UP DOWN

AND
OPEN DIALOG
INTRODUCTION
A NumericUpDown control allows a user to provide a spin (up/down)
interface to move through predefined numbers using up and down
arrows.
NumericUpDown represents a numeric textbox that can be
increased or decreased in value. With many properties and event
handlers, the NumericUpDown control is ideal for interfaces where
a number is entered or adjusted.
STEPS TO CREATE THE
COMPONENT
Creating a NumericUpDown control is a work of creating an
instance of NumericUpDown class, setting its properties and adding
it to the form.

First step to create a NumericUpDown control is to create an


instance of NumericUpDown class.
The next step is to set its properties.
Finally, add to the form.
SAMPLE CODE
BASIC PROPERTIES OF
NUMERICUPDOWN
 NumericUpDown. Value :- sets or gets the value assigned to the
component.
 NumericUpDown. Minimum :- sets the minimum value.
 NumericUpDown. Maximum :- sets the maximum value.
 NumericUpDown. Increment :- used to change the value to
increment or decrement the spin.
 NumericUpDown. Font :- sets the font of the text.
 NumericUpDown. Enabled :- enables/disables the component.
CONT.
 NumericUpDown. DecimalPlaces :- Specifies the number of digits
displayed after the decimal symbol.
 NumericUpDown. Parent :- Sets or gets the parent container of the
control.
 NumericUpDown. Size :- Sets or gets the width and height of the
control.
 NumericUpDown. Visible :- Sets or gets the value indicating
whether the control is displayed.
 NumericUpDown. ThousandsSeparator :- displays a
ThousandsSeparator (comma) on the numbers displayed on the
control.
This example shows how to set the minimum and maximum values for three
NumericUpDown controls day, month, and year together with the output.
EVENTS FOR
NUMERICUPDOWN
There are various events but the most common is the
ValueChanged event. It occurs when we try to change the value of
the NumericUpDown control by clicking the arrows or pressing the
up or down arrow keys. The following example shows how to use
this event to display the value of the day NumericUpDown control
on a message box.
EXAMPLE (CONT.)
CONT.
Other events…
 KeyDown,
 KeyUp,
 KeyPress,
 MouseClick,
 SizeChanged,
 Leave, etc.

You might also like