From Clomosy Docs
function AddNewNumberBox(AComponent: TCLComponent; xName: string): TClNumberBox;
AComponent : Specifies the parent of the object to be defined.
xName : The name of the defined TclNumberBox object must be written.
The TclNumberBox component provides controls for users to input numerical values and to increment/decrement these values.
| Feature | Use of | Definition |
|---|---|---|
| TclNumberBox | NumberBox1 : TClNumberBox; | A variable belonging to the TclNumberBox class is created. |
| AddNewSwitch | NumberBox1 = Form1.AddNewNumberBox(Form1,'tstNumberBox'); | A new TclNumberBox component is added to the form. |
| Value | NumberBox1.Value = 9; | This property specifies or sets the current numerical value of the TclNumberBox component. |
| Min | NumberBox1.Min = 0; |
Specifies the minimum value. The user cannot go below this value. |
| Max | NumberBox1.Max = 10; | Specifies the maximum value. The user cannot exceed this value. |
Example
Var
Form1:TclForm;
NumberBox1 : TClNumberBox;
{
Form1 = TclForm.Create(Self);
NumberBox1 = Form1.AddNewNumberBox(Form1,'tstNumberBox');
NumberBox1.Align = alCenter;
NumberBox1.Height = 20;
NumberBox1.Width = 100;
NumberBox1.Value = 9;
NumberBox1.Min = 0;
NumberBox1.Max = 25;
Form1.Run;
}