BBjWindow::addInputD

Description

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

Syntax

Return Value

Method

BBjInputD

addInputD(int ID, int x, int y, int w, int h)

BBjInputD

addInputD(int ID, int x, int y, int w, int h, string flags)

BBjInputD

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

BBjInputD

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

BBjInputD

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

BBjInputD

addInputD(int ID, int x, int y, int w, int h, 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

Accepts a date from the user.

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
RETURN

See Also

BBjAPI

BBjSysGui

BBjControl

BBjWindow

INPUTD Mnemonic

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



______________________________________________________________________________________

Copyright BASIS International Ltd. BBj®, Visual PRO/5®, PRO/5®, and BBx® are registered trademarks.