Index
The Numeric UD and how to create it
The Parameters
Numeric UD Functions
Important Info

The Numeric UD and how to create it

The Numeric UD inherits from the control class. It is one of the many ways for an application to input information to the application. A Numeric UD is
common in GUI applications as a way to input information that has is in between a range of numbers.

--Numeric UD:
f1 = form(10, 10, 100, 100, false, "Main", color.white, color.AirForceBlue, true, false, false, false, false, false, true)
nud1 = NumericUD(1, 1, 5, color.black, 10, 0, color.black, color.black, f1, false)

The code is exactly how you would create a Numeric UD. You must have a form created in order to store your Numeric UD, as with any other derivative of
the control class. As always you can declare any class two ways and if you dont remember how, read the forms reference here: Forms
The image below shows what the Numeric UD declared above looks like.

Figure 15:

Numeric UD Image

The Parameters

The Numeric UD parameters are as follows:

Parameter Description
int x The x location of the Numeric UD on the screen.
int y The y location of the Numeric UD on the screen.
int num The current number to be displayed.
color linecolor Sets the Numeric UD's outline color.
int maxnum The largest number that can be selected.
int minnumber The lowest number that can be selected.
color textcolor Sets the Numeric UD's text color.
color pmbcolor Sets the Numeric UD's plus and minus buttons color.
form parent The form that the Numeric UD will be visible on.
bool selected Sets the Numeric UD to selected or unselected.

If you dont know the keywords, go here: Forms

Numeric UD Functions

Here are the diffrent functions that you can call that do something with Numeric UDs:

Function Description Call example
Up Increases the number in the Numeric UD NumericUD_name:Up()
Down Decreases the number in the Numeric UD NumericUD_name:Down()

Important Info

I still havent given users the ability to type in the number, but its comming. I also am going to give it a step property.
I hope to have them done soon.