BBjInputT::setMask

Description

In BBj 24.00 and higher, this method sets the mask for the BBjInputT control.

Syntax

Return Value Method
void setMask(string mask)

Parameters

Parameter Description
mask Specifies the time mask.

Return Value

None.

Remarks

The mask is formatted according to the rules of the DATE() function and is assumed to represent a time value. It should be limited to the following format codes and standard separators like ":", ".", and " ".

Format Description
%a Localized am/pm string.
%H Hour (24-hour clock, 0..23).
%h Hour (12-hour clock, 1..12).
%m Minute 0..59.
%s Second (0..59).
%t Millisecond (0..999).

Example

sysgui = unt
open (sysgui)"X0"
sysgui! = bbjapi().getSysGui()
window! = sysgui!.addWindow(50,50,200,150,"BBjInputT",$00090083$)
window!.setCallback(window!.ON_CLOSE,"eoj")
inputt! = window!.addInputT(101,25,25,150,25,$0008$)
print "getMask ",inputt!.getMask()
inputt! = window!.addInputT(102,25,85,150,25,$0008$)
mask$ = "%Hz:%mz:%sz %a"
time$ = stbl("!TIME",err=oops)
time = pos($00$=time$)
if time then mask$ = time$(time+1) else mask$ = time$
oops:
inputt!.setMask(mask$)
print "getMask",inputt!.getMask()
process_events

eoj:
release

ClosedVersion History

  • BBj 24.00: BBjInputT::setMask added.

See Also

BBjAPI

BBjSysGui

BBjControl

BBjWindow

Date Function for mask options

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