BBjInputT

Description

In BBj 24.00 and higher, the BBjInputT object provides methods for manipulating a GUI time control.

Implemented Interfaces

DragSource, DropTarget, Editable, Focusable, RecordSetBindable, SimpleRecordSetBindable, TabTraversable, TextAlignable, TextControl, Validateable

Creation

BBjAPI > BBjSysGui > BBjWindow > BBjInputT

A BBjInputT object is created through the following BBjWindow methods:

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)

Methods of BBjInputT

Return Value

Method

boolean

getBeep()

int

getCaretPosition()

string

getEditString()

int

getError()

boolean

getHighlight()

boolean

getInsertMode()

int

getLength()

string

getLocale()

int

getMargin()

string

getMask()

boolean

getPassEnter()

boolean

getPassTab()

string

getRestore()

number

getValue()

boolean

isEditable()

void

restore()

void

selectAll()

void

setBeep(boolean beep)

void

setCaretPosition(int pos)

void

setEditable(boolean editable)

void

setEditString(string edit)

void

setHighlight(boolean highlight)

void

setInsertMode(boolean insert)

void

setLength(int length)

void

setLocale(String locale)

void

setMargin(int marginWidth)

void

setMask(string mask)

void

setPassEnter(boolean pass)

void

setPassTab(boolean pass)

void

setRestore(string restore)

void

setValue(number value)

void

showTimePicker()

Methods of BBjInputT implemented for DragSource

Return Value Method
int getDragActions()
string getDragType()
void setDragActions(int actions)
void setDragType(string type)

Methods of BBjInputT implemented for DropTarget

Return Value Method
int getDropActions()
void setDropActions(int actions)
BBjVector getDropTypes()
void setDropTypes(BBjVector types)

Methods of BBjInputT implemented for Editable

Return Value Method
boolean isEditable()
void setEditable(boolean edit)

Methods of BBjInputT implemented for Focusable

Return Value Method
boolean isFocusable()
void setFocusable(boolean focus)

Methods of BBjInputT implemented for RecordSetBindable

Return Value Method
void bindRecordSet(BBjRecordSet recordset!, string fieldname)
string getBoundFieldName()

Methods of BBjInputT implemented for SimpleRecordSetBindable

Return Value Method
BBjRecordSet getBoundRecordSet()
void unbindRecordSet()

Methods of BBjInputT implemented for TabTraversable

Return Value Method
boolean isTabTraversable()
void setTabTraversable(boolean trav)

Methods of BBjInputT implemented for TextAlignable

Return Value Method
int getAlignment()
void setAlignment(int align)

Methods of BBjInputT implemented for TextControl

Return Value Method
void addWord(string word)
int getBottomMargin()
string getCustomDictionary()
BBjColor getDisabledTextColor()
boolean getDragEnabled()
int getHighlightOnFocus()
int getLeftMargin()
string getLocale()
int getMaxSuggestions()
BBjVector getMisspelledWords()
string getPlaceholder()
BBjColor getPlaceholderColor()
int getRightMargin()
BBjColor getSpellCheckColor()
string getSpellCheckLanguage()
boolean getSpellCheckOption(int option)
BBjVector getSuggestions(string word)
int getTopMargin()
void ignoreWord(string word)
boolean isMisspelled(string word)
boolean isSpellChecked()
void removeWord(string word)
void setBottomMargin(int margin)
void setCustomDictionary(string filename)
void setDisabledTextColor(BBjColor color!)
void setDragEnabled(boolean enabled)
void setHighlightOnFocus(int behavior)
void setLeftMargin(int margin)
void setLocale(string locale)
void setMaxSuggestions(int count)
void setPlaceholder(string placeholder)
void setPlaceholderColor(BBjColor color!)
void setRightMargin(int margin)
void setSpellCheckColor(BBjColor color!)
void setSpellChecked(boolean check)
void setSpellCheckLanguage(string language)
void setSpellCheckOption(int option, boolean value)
void setTopMargin(int margin)

Methods of BBjInputT implemented for Validateable

Return Value Method
void accept(boolean valid)
string getValidationText()

Methods of BBjInputT inherited from BBjControl

Events

Callback Code

Object-oriented Event

Read Record Event

Code

ON_CONTROL_VALIDATION

BBjControlValidationEvent

Control Validation Event

v

ON_DROP_TARGET_DROP

BBjDropTargetDropEvent

Drop Target Drop Event

D

ON_EDIT_MODIFY

BBjEditModifyEvent

Edit Control Modify Event

e

ON_GAINED_FOCUS

BBjGainedFocusEvent

Control Focus Gained/Lost Event

f

ON_INPUT_KEYPRESS

BBjInputKeypressEvent

Input Control Keypress

N (Notify Code 1)

ON_LOST_FOCUS

BBjLostFocusEvent

Control Focus Gained/Lost Event

f

ON_MOUSE_ENTER

BBjMouseEnterEvent

Mouse Enter/Exit Event

E

ON_MOUSE_EXIT

BBjMouseExitEvent

Mouse Enter/Exit Event

E

ON_POPUP_REQUEST

BBjPopupRequestEvent

Popup Request Event

r

ON_RIGHT_MOUSE_DOWN

BBjRightMouseDownEvent

Right Mouse Button Down Event

R

CSS

BUI logoCSS

The visual appearance of BUI controls is defined using CSS (cascading style sheets) rules. Easily change the default colors, border, and other settings by customizing these rules, all without changing any application code. See CSS API for a high-level overview of BUI CSS.

The BBjInputT control is two separate elements. The edit box itself is an <input type="text"> element, styled with the .BBjInputT class name. The popup time picker has a primary class name of .BBjInputT-timePicker.

.BBjInputT
.BBjInputT.bbj-disabled
.BBjInputT.bbj-focused
.BBjInputT.bbj-readonly
.BBjInputT-timePicker
.BBjInputT-timePicker-time
.BBjInputT-timePicker-am
.BBjInputT-timePicker-pm
.BBjInputT-timePicker-hours
.BBjInputT-timePicker-hours12
.BBjInputT-timePicker-hours24
.BBjInputT-timePicker-minutes
.BBjInputT-timePicker-seconds
.BBjInputT-timePicker-milliseconds
.BBjInputT-timePicker-buttons
.BBjInputT-timePicker-accept
.BBjInputT-timePicker-cancel

Remarks

To display a time picker, press CTRL+P in GUI or the down arrow in BUI. This hotkey can be customized using BBjInputT::setEditString.

Constants inherited from BBjControl

Example

sysgui = unt
open (sysgui)"X0"
sysgui! = bbjapi().getSysGui()

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

inputt! = window!.addInputT(101,25,25,150,25,$0008$)
inputt!.focus()

edit$ = inputt!.getEditString()
print "Edit string is ",hta(edit$)

picker = pos($55$=edit$,-1)
if picker and mod(picker,2)=0 then edit$(picker-1,1) = $1c$; rem ' F1
if picker and mod(picker,2)=0 then edit$(picker-1,1) = $03$; rem ' ^C
inputt!.setEditString(edit$)

edit$ = inputt!.getEditString()
print "Edit string is ",hta(edit$)

process_events

eoj:
release

ClosedVersion History

  • BBj 23.06: Added two constants for BBjControl: 91 (INPUTT_CONTROL) and 92 (INPUTTSPINNER_CONTROL).

See Also

BBjAPI

BBjSysGui

BBjWindow

CALLBACK Verb - Register BBj Subroutine

DWC Component: dwc-timefield

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