INPUTN Mnemonic - Create Numeric Edit (INPUTN) Control




For BBj-specific information, see the INPUTN Mnemonic - Create Numeric Edit Control BBj .

The 'INPUTN' mnemonic creates a graphical edit control that accepts user input in a manner similar to the INPUTN verb. Unlike the INPUTN verb, however, the 'INPUTN' mnemonic generates an edit mask from the output mask and allows the user to remove and reassert focus. The 'INPUTN' mnemonic does not provide numeric verification.




INPUTN control ID.


Horizontal position of the upper-left corner of the INPUTN control.


Vertical position of the upper-left corner of the INPUTN control.


Width of the INPUTN control.


Height of the INPUTN control. To create a standard size control, set the h parameter to 0.


Control flags, as follows:








Sets the control to be initially disabled.




Passes the Enter key to the parent window.




Passes the Tab key to the parent window.




Prompts non-mouse events on the control to highlight the control text.




Sets the control to be initially invisible.




Draws a recessed client edge around the control.




Defines the edit text as read-only (Visual PRO/5 Rev. 3.12 or later).




Draws a raised edge around the control.


Output mask. Uses standard PRO/5 numeric mask conventions and provides a check for the data.

If the "0" mask is used and SETOPTS byte 2, bit $80$ is set, it will not be possible to insert values. Either disable the SETOPTS bit or use the "#" mask.


Input rules. If null, the value in STBL("!IRULES") is used as a default. The mask$ is used to generated the edit mask, which uses "#", "0", and "." mask characters.



Flag Bit

Effect on Input if Bit is Set




Causes commas and numeric characters to be copied when generating the edit mask from mask$.




Accepts the decimal point replacement character for data entry defined by SETOPTS(6,1).




Causes the system to beep upon entry of invalid data.




Allows only non-negative numbers in the InputN control.


Restore value.


Default value.

Display vs. Edit Mode

When an INPUTN control has focus, it is considered to be in the "Edit" mode. If it does not have focus, it is considered to be in the "Display" mode.

If the control has an associated mask, the content of the control may change as the control changes from Edit to Display mode. Mask characters such as '$', '.', and (' and ') are visible in Display mode but are not visible in Edit mode. Therefore, making a selection within the control can be a two-step process.

If the control does not have focus, the focus must first be set by either clicking on the control or tabbing to the control. Once in focus, the control's contents are properly formatted for editing. At this point, the caret is always placed before the left-most digit for editing. The contents can then be selected by using the mouse or keyboard.

The 'INPUTN' control is displayed in the x,y,w,h position in current units. It displays val as the initial value using mask$. Unless the right-most entry ($01$) flag is set, the caret is set to the far left. If the "revertoinpute" flag ($0020$) is set, and the first character entered is non-numeric, input proceeds as in the 'INPUTE' mnemonic.

Upon entry of numeric data (digits, ".", "+", and "-"), the initial value is replaced with the new data. With each numeric keystroke, the value is calculated and redisplayed using the input mask. The "+" and "-" symbols determine the number's sign and may be entered at any time. The effect is a calculator-style numeric entry.

The backspace key may be used to correct typing errors. If at any time the restore command is issued (see the STBL("!EDIT") information in the User's Reference Guide), the value of the restore$ parameter is displayed and may be accepted or edited.

Upon completion of the entry, the entered value is saved in val and displayed using mask$. If no entry occurs, val remains unchanged, and the original value is displayed using mask$.

INPUTN Clipboard Operations

The INPUTN control processes the standard Ctrl+X (Cut), Ctrl+C (Copy), and Ctrl+V (Paste) clipboard functions. When copying to the clipboard, only the text returned by retrieving the title is copied. The INPUTN control is the edit control used in the grid control and allows for copy and paste operations between INPUTN controls. If the text pasted into an INPUTN control does not mask correctly, the application generates an Error Code Notify event.


The following describes the parameters INPUTN SENDMSG() functions:




Valid SYSGUI channel.


Object ID.


Specific function, described in the SENDMSG() function documentation.


Four-byte integer that contains an argument for a given function.


String argument for a given function.


Context that contains the specified ID. This parameter is only necessary for objects that do not pertain to the current context.

The returned value indicates the success or failure of the operation: $01$ indicates success, while $00$ indicates failure. The error can be requested or is sent via the Notify event. The INPUTN SENDMSG() functions are described in the SENDMSG() documentation.

See Also

Mnemonics - Alphabetical Listing

Mnemonics - Group Listing