BBjWindow::addInputE

Description

Creates a masked edit control in the BBjWindow.

Syntax

Return Value

Method

BBjInputE

addInputE(int ID, number x, number y, number w, number h)

BBjInputE

addInputE(int ID, number x, number y, number w, number h, string flags)

BBjInputE

addInputE(int ID, number x, number y, number w, number h, string flags, int len)

BBjInputE

addInputE(int ID, number x, number y, number w, number h, string flags, int len, string pad)

BBjInputE

addInputE(int ID, number x, number y, number w, number h, string flags, int len, string pad, string val)

BBjInputE

addInputE(int ID, number x, number y, number w, number h, string flags, int len, string pad, int initPos, string restore, string val)

BBjInputE

addInputE(int ID, number x, number y, number w, number h, string flags, string mask)

BBjInputE

addInputE(int ID, number x, number y, number w, number h, string flags, string mask, string pad)

BBjInputE

addInputE(int ID, number x, number y, number w, number h, string flags, string mask, string pad, string val)

BBjInputE

addInputE(int ID, number x, number y, number w, number h, string flags, string mask, string pad, int initPos, string restore, string val)

BBjInputE addInputE(int ID)
BBjInputE addInputE(int ID, string flags)
BBjInputE addInputE(int ID, string flags, int len)
BBjInputE addInputE(int ID, string flags, int len, string pad)
BBjInputE addInputE(int ID, string flags, int len, string pad, string val)
BBjInputE addInputE(int ID, string flags, int len, string pad, int initPos, string restore, string val)
BBjInputE addInputE(int ID, string flags, string mask)
BBjInputE addInputE(int ID, string flags, string mask, string pad)
BBjInputE addInputE(int ID, string flags, string mask, string pad, string val)
BBjInputE addInputE(int ID, string flags, string mask, string pad, int initPos, string restore, string val)
BBjInputE addInputE()
BBjInputE addInputE(string flags)
BBjInputE addInputE(string flags, int len)
BBjInputE addInputE(string flags, int len, string pad)
BBjInputE addInputE(string flags, int len, string pad, string val)
BBjInputE addInputE(string flags, int len, string pad, int initPos, string restore, string val)
BBjInputE addInputE(string flags, string mask)
BBjInputE addInputE(string flags, string mask, string pad)
BBjInputE addInputE(string flags, string mask, string pad, string val)

BBjInputE

addInputE(string flags, string mask, string pad, int initPos, string restore, string val)

Parameters

Variable

Description

ID

INPUTE control ID.

x

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

y

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

w

Width of the INPUTE control.

h

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

flags

Control flags, as follows:

Flag  Description
$0000$ Left justifies text (default).
$0001$ Sets the control to be initially disabled.
$0002$ Passes the Enter key to the parent window.
$0004$ Passes the Tab key to the parent window.
$0008$ Prompts non-mouse events on the control to highlight the control text.
$0010$ Sets the control to be initially invisible.
$0020$ Designates the control to be part of a keyboard navigation group.
$0800$ Draws a recessed client edge around the control.
$1000$ Draws a raised edge around the control.
$4000$ Centers text.
$8000$ Right justifies text.
mask

The following defines the input mask characters for the mask$ parameter:

Input Mask Description
X Any printable character.
a Any alphabetic character.
A Any alphabetic character. Converts lower-case alphabetic characters to upper case.
0 Any digit.
U Any digit, alphabetic, space, or punctuation character. Converts lower-case alphabetic characters to upper case.
z Any digit or alphabetic character.
Z Any digit or alphabetic character. Converts lower-case alphabetic characters to upper case.

len

Length of the returned string.

pad

Input pad character.

val

Default value.

initPos

Beginning of the input region.

restore

Restore value.

Return Value

This method returns the created BBjInputE object.

Remarks

Accepts user input in a manner similar to the INPUTE verb.

If the ID parameter is not specified, a control ID is assigned dynamically using getAvailableControlID().

If the x, y, width, and height parameters are not specified, they're all initialized to 0. This is typically for use with DWC windows that dynamically arrange their contents (window creation flag $00100000$).

Example

rem 'Add a INPUTE control to a window

rem 'Obtain the instance of the BBjAPI object
let myAPI! = BBjAPI()

rem 'Open the SysGui device
SYSGUI = UNT
OPEN (SYSGUI) "X0"

rem 'Obtain the instance of the BBjSysGui object
let mySysGui! = myAPI!.getSysGui()

rem 'Set addWindow param values
X = 10
Y = 10
WIDTH = 200
HEIGHT = 200
TITLE$="BBj Window"

rem 'Set the current context
mySysGui!.setContext(0)

rem 'Create a window
myWindow! = mySysGui!.addWindow(X,Y,WIDTH,HEIGHT,TITLE$)

rem 'Add an INPUTE control that accepts only alphabetic characters and converts
rem 'all to upper case, limiting input to 10 characters, and inserting
rem 'the value "STANDARD" when the user hits the restore key (normally ESCAPE)
myInputE! = myWindow!.addInputE(101,50,100,90,30,$0804$,"AAAAAAAAAA","",1,"STANDARD","")

rem 'Register the CALLBACK routines
CALLBACK(ON_EDIT_MODIFY,INPUTE_MODIFIED,mySysGui!.getContext(),myInputE!.getID())
CALLBACK(ON_CLOSE,APP_CLOSE,mySysGui!.getContext())

rem 'Process Events
process_events

rem 'Callback routine called when the contents of the INPUTE control are modified
INPUTE_MODIFIED:
    rem 'Display a message with the INPUTE control contents
    MESSAGE$="The INPUTE contents are: " + STR(myInputE!.getText())
    let X = MSGBOX(MESSAGE$)
return

rem 'Callback routine called when the user closes the application window
APP_CLOSE:
release

See Also

BBjAPI

BBjSysGui

BBjControl

BBjWindow

`INPUTE' Mnemonic

See the BBj Object Diagram for an illustration of the relationship between BBj Objects.