INPUTD Mnemonic - Create Date Edit (INPUTD) Control

Syntax

'INPUTD'(id,x,y,w,h,flags$,mask$,irules$,restore,val)

Description

In BBj 4.0 and higher, the 'INPUTD' mnemonic creates a graphical edit control that accepts a date from a user.

Parameter

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

 

 

$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.

 

 

$0800$

Draws a recessed client edge around the control.

 

 

$1000$

Draws a raised edge around the control.

mask$

Output mask. Uses standard BBj DATE mask conventions and provides a check for the data. If mask$ is empty (""), the default date mask from STBL("!DATE") is used. See Date Input for complete rules.

irules$

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

 

 

Flag Bit

Effect on Input if Bit is Set

 

 

$10$

If a popup calendar is displayed, include a "week number" column.

 

 

$20$

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

 

 

$80$

Causes the system to beep upon entry of invalid data.

restore

Restore value (Julian date, 0 for today, -1 for blank).

val

Default value (Julian date, 0 for today, -1 for blank).

Notes

The 'INPUTD' control is displayed at the x, y, w, h position based on the current units. val is displayed as the initial date value using mask$.

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

Upon completion of the entry, the entered string is converted to a Julian date. The Julian date is displayed using mask$.

If the user presses the up-arrow key at any point, the next date is calculated and displayed.

If the user presses the down-arrow key at any point, the previous date is calculated and displayed.

If the user presses the CTRL+key currently mapped to the CALENDAR function (see STBL("!EDIT)), a popup calendar is displayed. The user can select a date from this displayed calendar or click the Close box to return to the INPUTD control. The popup calendar is formatted based on the value of STBL("!LOCALE") at the time when the control was created.

INPUTD Clipboard Operations

The INPUTD 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 INPUTD control is the edit control used in the grid control and allows for copy and paste operations between INPUTD controls. If the text pasted into an INPUTD control does not mask correctly, the application generates an Error Code Notify event.

INPUTD SENDMSG() Functions

The following describes the parameters INPUTD 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 INPUTD SENDMSG() functions are described in the SENDMSG() documentation.

See Also

Mnemonics - Alphabetical Listing

Mnemonics - Group Listing



______________________________________________________________________________________

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