BBjWindow::addInputT

Description

In BBj 24.00 and higher, this method creates a time input control on the BBjWindow.

Syntax

Return Value

Method

BBjInputT

addInputT()

BBjInputT

addInputT(int ID)

BBjInputT

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

BBjInputT

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

BBjInputT

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

BBjInputT

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

BBjInputT

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

BBjInputT

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

BBjInputT

addInputT(int ID, String flags)

BBjInputT

addInputT(int ID, String flags, String mask)

BBjInputT

addInputT(int ID, String flags, String mask, string rules)

BBjInputT

addInputT(int ID, String flags, String mask, string rules, number restore, number value)

BBjInputT

addInputT(String flags)

BBjInputT

addInputT(String flags, String mask)

BBjInputT

addInputT(String flags, String mask, string rules)

BBjInputT

addInputT(String flags, String mask, string rules, number restore, number value)

Parameters

Parameter Description

id

INPUTT control ID.

x

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

y

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

w

Width of the INPUTT control.

h

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

flags Control flags, as follows:
FlagDescription
$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 omitted or specified as "", the current default time mask from STBL("!TIME") is used.
rules

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

Flag Bit Effect on Input if Bit is Set
$80$ Beep if the user types more characters than the maximum length.

restore

Restore value, specified as a number as defined by the BBx TIM variable, or -1 for blank.

val

Initial value, specified as a number as defined by the BBx TIM variable, or -1 for blank. 

Return Value

This method returns the created BBjInputT 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 ' BBjInputT

sysgui = unt
open (sysgui)"X0"

sysgui! = bbjapi().getSysGui()
sysgui!.setScale(2,2)

window! = sysgui!.addWindow(25,25,150,150,"BBjInputT",$00090083$)
window!.setCallback(window!.ON_CLOSE,"eoj")

inputt! = window!.addInputT(101,25,25,100,25,$0008$)
inputt!.setPlaceholder(inputt!.getMask())
inputt!.setToolTipText(inputt!.getMask())
inputt!.focus()

mask$ = "%hz:%mz:%sz %a"
inputt! = window!.addInputT(102,25,75,100,25,$0008$,mask$)
inputt!.setPlaceholder(inputt!.getMask())
inputt!.setToolTipText(inputt!.getMask())

process_events

eoj:
release

ClosedVersion History

  • BBj 24.00: BBjMethod added.

See Also

BBjAPI

BBjSysGui

BBjControl

BBjWindow

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