INPUTN Mnemonic - Create Numeric Edit (INPUTN) Control
Syntax
'INPUTN'(id,x,y,w,h,flags$,mask$,irules$,restore,val)
Description
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.
Parameter | Description | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
id | INPUTN control ID. | ||||||||||||||||||
x | Horizontal position of the upper-left corner of the INPUTN control. | ||||||||||||||||||
y | Vertical position of the upper-left corner of the INPUTN control. | ||||||||||||||||||
w | Width of the INPUTN control. | ||||||||||||||||||
h | Height of the INPUTN control. To create a standard size control, set the h parameter to 0. | ||||||||||||||||||
title | Title of the control. | ||||||||||||||||||
flags | Control flags,
as follows:
|
||||||||||||||||||
mask$ |
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. |
||||||||||||||||||
irules$ | 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.
|
||||||||||||||||||
restore | Restore value. | ||||||||||||||||||
val | 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
INPUTN SENDMSG() Functions
The following describes the parameters INPUTN SENDMSG() functions:
Parameter |
Description |
sysgui |
Valid SYSGUI channel. |
id |
Object ID. |
function |
Specific function, described in the SENDMSG() function documentation. |
int |
Four-byte integer that contains an argument for a given function. |
string$ |
String argument for a given function. |
context |
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.