Skip to content

NumericTextbox

Samuel Gomes edited this page Feb 12, 2024 · 2 revisions

NumericTextBox controls are used to receive input from the user, but it's limited to numbers only.

numerictb

There are two modes to NumericTextBox controls, with or without bounds. At design time, you right-click a NumericTextBox control and choose "Allow min/max bounds" and specify the minimum and maximum values allowed, and InForm takes care of validating user input. At design time, a NumericTextBox control is created without bounds set, but when you enable bound checking, limits will be preset to INTEGER limits (-32768 to 32767).

To read back what was typed, you can either use the Text array:

Var$ = Text(ControlID)

Or the .Value property:

Value% = Control(ControlID).Value

The Caption property can be used to display a caption inside the input box. The caption is hidden as soon as the user starts entering numbers.

Properties editable at runtime

Clone this wiki locally