BBjInputE

Creation Path


BBjAPI

|

+--BBjSysGui

|

+--BBjWindow

|

+--BBjInputE

 

Description

The BBjInputE object provides methods for manipulating a GUI InputE control.

Implemented Interfaces

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

Creation

A BBjInputE object is created through the following BBjWindow methods:

Return Value

Method

BBjInputE

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

BBjInputE

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

BBjInputE

addInputE(int ID, int x, int y, int w, int h, string flags, int len)

BBjInputE

addInputE(int ID, int x, int y, int w, int h, string flags, int len, string pad)

BBjInputE

addInputE(int ID, int x, int y, int w, int h, string flags, int len, string pad, string val)

BBjInputE

addInputE(int ID, int x, int y, int w, int h, string flags, int len, string pad, int initPos, string restore, string val)

BBjInputE

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

BBjInputE

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

BBjInputE

addInputE(int ID, int x, int y, int w, int h, string flags, string mask, string pad, string val)

BBjInputE

addInputE(int ID, int x, int y, int w, int h, string flags, string mask, string pad, int initPos, string restore, string val)

Methods of BBjInputE

Return Value

Method

int

getCaretPosition()

int

getError()

string

getEditString()

boolean

getHighlight()

boolean

getInsertMode()

int

getLength()

string

getMask()

int

getMargin()

string

getPadCharacter()

boolean

getPassEnter()

boolean

getPassTab()

string

getRestore()

boolean

isEditable()

void

restore()

void

selectAll()

void

setCaretPosition(int pos)

void

setEditable(boolean editable)

void

setEditString(string edit)

void

setHighlight(boolean highlight)

void

setInsertMode(boolean insert)

void

setLength(int len)

void

setMargin(int marginWidth)

void

setMask(string mask)

void

setPadCharacter(string pad)

void

setPassEnter(boolean pass)

void

setPassTab(boolean pass)

void

setRestore(string restore)

Methods of BBjInputE implemented for DragSource

Return Value

Method

int

getDragActions()

string

getDragType()

void

setDragActions(int actions)

void

setDragType(string type)

Methods of BBjInputE implemented for DropTarget

Return Value

Method

int

getDropActions()

void

setDropActions(int actions)

BBjVector

getDropTypes()

void

setDropTypes(BBjVector types)

Methods of BBjInputE implemented for Editable

Return Value

Method

boolean

isEditable()

void

setEditable(boolean p_edit)

Methods of BBjInputE implemented for Focusable

Return Value

Method

boolean

isFocusable()

void

setFocusable(boolean p_focus)

Methods of BBjInputE implemented for RecordSetBindable

Return Value

Method

void

bindRecordSet(BBjRecordSet recordset, string fieldname)

string

getBoundFieldName()

Methods of BBjInputE implemented for SimpleRecordSetBindable

Return Value

Method

BBjRecordSet

getBoundRecordSet()

void

unbindRecordSet()

Methods of BBjInputE implemented for TabTraversable

Return Value

Method

boolean

isTabTraversable()

void

setTabTraversable(boolean trav)

Methods of BBjInputE implemented for TextAlignable

Return Value

Method

int

getAlignment()

void

setAlignment(int p_align)

Methods of of BBjInputE implemented 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 BBjInputE implemented for Validateable

Return Value

Method

void

accept(boolean valid)

string

getValidationText()

Methods of BBjInputE 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

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 BBjInputE is an <input type="text"> element, with extensive JavaScript logic to manage the complex masking rules. It defines the following style names:

.BBjInputE

.BBjInputE.bbj-disabled

.BBjInputE.bbj-focused

.BBjInputE.bbj-readonly

Remarks

None.

Constants inherited from BBjControl

Example

REM Add a INPUTE control to a window

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

REM Add an INPUTE control that accepts only alphabetic characters and converts
REM all to upper case, limiting input to 10 characters, and inserting
REM the value "STANDARD" when the user hits the restore key (normally ESCAPE)
myInputE! = myWindow!.addInputE(101,50,100,90,30,$0804$,"AAAAAAAAAA","",1,"STANDARD","")

REM Register the CALLBACK routines
CALLBACK(ON_EDIT_MODIFY,INPUTE_MODIFIED,mySysGui!.getContext(),myInputE!.getID())
CALLBACK(ON_CLOSE,APP_CLOSE,mySysGui!.getContext())

REM Process Events
PROCESS_EVENTS

REM Callback routine called when the contents of the INPUTE control are modified
INPUTE_MODIFIED:
REM Display a message with the INPUTE control contents
MESSAGE$="The INPUTE contents are: " + STR(myInputE!.getText())
LET X=MSGBOX(MESSAGE$)
RETURN

REM Callback routine called when the user closes the application window
APP_CLOSE:
RELEASE
RETURN

See Also

BBjAPI

BBjSysGui

BBjWindow

INPUTE Mnemonic - Create Graphical Edit (INPUTE) Control

CALLBACK Verb - Register BBj Subroutine

Focusable

RecordSetBindable

TabTraversable

TextControl

Validateable

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.