BBjWindow::addInputD

Description

In BBj 4.00 and higher, this method creates a date edit control on the BBjWindow.

Syntax

Return Value

Method

BBjInputD addInputD()
BBjInputD

addInputD(int ID)

BBjInputD

addInputD(int id, number x, number y, number w, number h, string flags)

BBjInputD

addInputD(int id, number x, number y, number w, number h, string flags, string mask)

BBjInputD

addInputD(int id, number x, number y, number w, number h, string flags, string mask, string rules)

BBjInputD

addInputD(int id, number x, number y, number w, number h)

BBjInputD

addInputD(int ID, number x, number y, number w, number h, string flags, string mask, string rules, int restore, int value)

BBjInputD addInputD(int ID, string flags)
BBjInputD addInputD(int ID, string flags, string mask)
BBjInputD addInputD(int ID, string flags, string mask, string rules)
BBjInputD addInputD(int ID, string flags, string mask, string rules, int restore, int value)
BBjInputD addInputD(string flags)
BBjInputD addInputD(string flags, string mask)
BBjInputD addInputD(string flags, string mask, string rules)

BBjInputD

addInputD(string flags, string mask, string rules, int restore, int value)

Parameters

Variable

Description

id

INPUTD control ID.

x

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

y

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

w

Width of the INPUTD control.

h

Height of the INPUTD 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.
$4000$ Centers text.
$8000$ Right justifies text.

mask

Output mask. If specified as "", the current default date mask from STBL("!DATE") is used. See Date Input for complete rules.

rules

Input rules. If specified as "", the value in STBL("!IRULES") is used.

Flag Bit Effect on Input if Bit is Set

$10$

Show "week number" column in the popup calendar.

$20$

Use +/- instead of up/down to move to next/previous date.

$80$

Beep if an invalid date is entered.

restore

Restore value, specified as a Julian date. Use -1 for blank, 0 for today, or JUL(Y,M,D) for a particular date.

val

Initial value, specified as a Julian date. Use -1 for blank, 0 for today, or JUL(Y,M,D) for a particular date.

Return Value

This method returns the created BBjInputD object.

Remarks

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 are all initialized to 0. This is typically for use with DWC windows that dynamically arrange their contents (window creation flag $00100000$).

Example

rem 'Create an InputD control

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$,$00010002$)

rem 'Create an InputD control
myInputD! = myWindow!.addInputD(101,50,100,90,30,$080c$)

rem 'Set focus to the InputD control
myInputD!.focus()

rem 'Register the CALLBACK routines
CALLBACK(ON_CLOSE,APP_CLOSE,mySysGui!.getContext())

rem 'Process Events
process_events

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

See Also

BBjAPI

BBjSysGui

BBjControl

BBjWindow

INPUTD Mnemonic

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