BBjInputTSpinner

Description

In BBj 24.00 and higher, the BBjInputTSpinner object provides a spinner on a BBjInputT.

Implemented Interfaces

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

Creation

BBjAPI > BBjSysGui > BBjWindow > BBjInputTSpinner

A BBjInputTSpinner object is created through the following BBjWindow methods:

Return Value Method

BBjInputTSpinner

addInputTSpinner()

BBjInputTSpinner

addInputTSpinner(int ID)

BBjInputTSpinner

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

BBjInputTSpinner

addInputTSpinner(int ID, number x, number y, number w, number h, number min, number max)

BBjInputTSpinner

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

BBjInputTSpinner

addInputTSpinner(int ID, number x, number y, number w, number h, string flags$, number min, number max)

BBjInputTSpinner

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

BBjInputTSpinner

addInputTSpinner(int ID, number x, number y, number w, number h, string flags$, string mask$, number min, number max)

BBjInputTSpinner

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

BBjInputTSpinner

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

BBjInputTSpinner

addInputTSpinner(int ID, number x, number y, number w, number h, string flags$, string mask$, string rules$, number restore, number value, number min, number max)

BBjInputTSpinner

addInputTSpinner(int ID, number min, number max)

BBjInputTSpinner

addInputTSpinner(int ID, String flags$)

BBjInputTSpinner

addInputTSpinner(int ID, String flags$, number min, number max)

BBjInputTSpinner

addInputTSpinner(int ID, String flags$, String mask$)

BBjInputTSpinner

addInputTSpinner(int ID, String flags$, String mask$, number min, number max)

BBjInputTSpinner

addInputTSpinner(int ID, String flags$, String mask$, string rules$)

BBjInputTSpinner

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

BBjInputTSpinner

addInputTSpinner(int ID, String flags$, String mask$, string rules$, number restore, number value, number min, number max)

BBjInputTSpinner

addInputTSpinner(number min, number max)

BBjInputTSpinner

addInputTSpinner(String flags$)

BBjInputTSpinner

addInputTSpinner(String flags$, number min, number max)

BBjInputTSpinner

addInputTSpinner(String flags$, String mask$)

BBjInputTSpinner

addInputTSpinner(String flags$, String mask$, number min, number max)

BBjInputTSpinner

addInputTSpinner(String flags$, String mask$, string rules$)

BBjInputTSpinner

addInputTSpinner(String flags$, String mask$, string rules$, number restore, number value)

BBjInputTSpinner

addInputTSpinner(String flags$, String mask$, string rules$, number restore, number value, number min, number max)

Methods of BBjInputTSpinner

Return Value Method

number

getMaximumTime()

number

getMinimumTime()

number

getNextTime()

number

getPreviousTime()

int

getSpinField()

void

setMaximumTime(number max)

void

setMinimumTime(number min)

void

setSpinField(int spinField)

Methods of BBjInputTSpinner inherited from BBjSpinner

Return Value Method
void spin(boolean up)

Methods of BBjInputTSpinner inherited from 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 BBjInputTSpinner implemented for DragSource

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

Methods of BBjInputTSpinner implemented for DropTarget

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

Methods of BBjInputTSpinner implemented for Editable

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

Methods of BBjInputTSpinner implemented for Focusable

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

Methods of BBjInputTSpinner implemented for MouseWheelEnabled

Return Value Method
int getScrollWheelBehavior()
void setScrollWheelBehavior(int trav)

Methods of BBjInputTSpinner implemented for RecordSetBindable

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

Methods of BBjInputTSpinner implemented for SimpleRecordSetBindable

Return Value Method
BBjRecordSet getBoundRecordSet()
void unbindRecordSet()

Methods of BBjInputTSpinner implemented for TabTraversable

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

Methods of BBjInputTSpinner implemented for TextAlignable

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

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

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

Methods of BBjInputTSpinner inherited from BBjControl

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

ON_SPIN BBjSpinEvent Spin Event x

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.

For BBjSpinner samples, refer to the BUI Showcase (demo, code). The BBjInputTSpinner control contains a BBjInputT, followed by spinner arrows in a structure with the style name .BBjSpinner-arrows and either .BBjSpinner-horizontal-arrows or .BBjSpinner-vertical-arrows. It defines the following style names:

.BBjSpinner
.BBjInputTSpinner
.BBjInputT
.BBjInputT-picker
.BBjInputTSpinner.bbj-disabled
.BBjInputTSpinner.bbj-focused
.BBjInputTSpinner.bbj-readonly
.BBjSpinner-arrows
.BBjSpinner-horizontal-arrows (on touch-oriented devices)
.BBjSpinner-vertical-arrows (on mouse-oriented systems)
.BBjSpinner-upArrow
.BBjSpinner-downArrow

Constants

Value Constant
10 HOUR
11 HOUR_OF_DAY
12 MINUTE
13 SECOND
14 MILLISECOND

Constants inherited from BBjControl

Example

rem ' BBjInputTSpinner

sysgui = unt
open (sysgui)"X0"
print (sysgui)'scale'(2,2)
sysgui! = bbjapi().getSysGui()
window! = sysgui!.addWindow(25,25,230,250,"BBjInputTSpinner",$2009008f$)
window!.setCallback(sysgui!.ON_CLOSE,"eoj")

rem ' BBjInputTSpinner
window!.addGroupBox(101,10,10,200,210,"BBjInputTSpinner")
window!.addStaticText(102,15,30,60,25,"Spinner:",$8000$)
inputt! = window!.addInputTSpinner(103,80,30,115,25,9,16.5)
inputt!.setValue(time("123456"))
inputt!.setCallback(sysgui!.ON_SPIN, "spin")
inputt!.setCallback(sysgui!.ON_INPUT_KEYPRESS,"event")
inputt!.setCallback(sysgui!.ON_EDIT_MODIFY,"event")
inputt!.setCallback(sysgui!.ON_GAINED_FOCUS,"event")
inputt!.setCallback(sysgui!.ON_LOST_FOCUS,"event")
inputt!.setCallback(sysgui!.ON_MOUSE_ENTER,"event")
inputt!.setCallback(sysgui!.ON_MOUSE_EXIT,"event")
inputtSpinDown! = window!.addButton(104,80,60,40,21,"<",$$)
inputtSpinDown!.setCallback(sysgui!.ON_BUTTON_PUSH,"inputtSpinDown")
inputtSpinUp! = window!.addButton(105,125,60,40,21,">",$$)
inputtSpinUp!.setCallback(sysgui!.ON_BUTTON_PUSH,"inputtSpinUp")
window!.addStaticText(106,15,90,60,25,"Mask:",$8000$)
inputtMask! = window!.addEditBox(107,80,90,100,25,inputt!.getMask())
inputtMask!.setCallback(sysgui!.ON_LOST_FOCUS,"inputtMask")
window!.addStaticText(108,15,120,60,25,"Minimum:",$8000$)
inputtMinimum! = window!.addInputT(109,80,120,100,25)
inputtMinimum!.setValue(inputt!.getMinimumTime())
inputtMinimum!.setCallback(sysgui!.ON_LOST_FOCUS,"inputTMinimum")
window!.addStaticText(110,15,150,60,25,"Maximum:",$8000$)
inputtMaximum! = window!.addInputT(111,80,150,100,25)
inputtMaximum!.setValue(inputt!.getMaximumTime())
inputtMaximum!.setCallback(sysgui!.ON_LOST_FOCUS,"inputTMaximum")
inputtHour! = window!.addRadioButton(113,15,180,45,25,"h",$0020$)
inputtHour!.setCallback(sysgui!.ON_CHECK_ON,"inputtHours")
inputtHour!.setToolTipText("Spin hours")
inputtMinute! = window!.addRadioButton(114,60,180,45,25,"m",$0024$)
inputtMinute!.setCallback(sysgui!.ON_CHECK_ON,"inputtMinutes")
inputtMinute!.setToolTipText("Spin minutes")
inputtSecond! = window!.addRadioButton(115,105,180,45,25,"s",$0020$)
inputtSecond!.setCallback(sysgui!.ON_CHECK_ON,"inputtSeconds")
inputtSecond!.setToolTipText("Spin seconds")
inputtMillisecond! = window!.addRadioButton(116,150,180,45,25,"t",$0020$)
inputtMillisecond!.setCallback(sysgui!.ON_CHECK_ON,"inputtMilliseconds")
inputtMillisecond!.setToolTipText("Spin milliseconds")
vector! = bbjapi().makeVector()
vector!.add(inputtHour!)
vector!.add(inputtMinute!)
vector!.add(inputtSecond!)
vector!.add(inputtMillisecond!)
radioGroup! = window!.addRadioGroup(vector!)
statusbar! = window!.addStatusBar(99,$$)
statusbar!.setText("Spin events go here")
dim event$:tmpl(sysgui)
process_events

eoj:
release

event:
    event! = sysgui!.getLastEvent()
    control! = event!.getControl()
    print control!," ",event!
return

spin:
    gosub event
    statusbar!.setText("Spin on "+c$+": "+event!.getText())
return

inputtSpinUp:
    time = inputt!.getNextTime()
    print "getNextTime",time," ",date(0,time:inputt!.getMask(),err=*next)
    inputt!.spin(1)
return

inputtSpinDown:
    time = inputt!.getPreviousTime()
    print "getPreviousTime",time," ",date(0,time:inputt!.getMask(),err=*next)
    inputt!.spin(0)
return

inputtMask:
    inputt!.setMask(inputtMask!.getText())
    inputtMinimum!.setMask(inputtMask!.getText())
    inputtMaximum!.setMask(inputtMask!.getText())
return

inputtMinimum:
    inputt!.setMinimumTime(inputtMinimum!.getValue())
    print "getMinimumTime",inputt!.getMinimumTime()
return

inputtMaximum:
    inputt!.setMaximumTime(inputtMaximum!.getValue())
    print "getMaximumTime",inputt!.getMaximumTime()
return

inputtHours24:
    inputt!.setSpinField(inputt!.HOUR_OF_DAY)
    print "getSpinField",inputt!.getSpinField()
return

inputtHours:
    inputt!.setSpinField(inputt!.HOUR)
    print "getSpinField",inputt!.getSpinField()
return

inputtMinutes:
    inputt!.setSpinField(inputt!.MINUTE)
    print "getSpinField",inputt!.getSpinField()
return

inputtSeconds:
    inputt!.setSpinField(inputt!.SECOND)
    print "getSpinField",inputt!.getSpinField()
return

inputtMilliseconds:
    inputt!.setSpinField(inputt!.MILLISECOND)
    print "getSpinField",inputt!.getSpinField()
return

ClosedVersion History

  • BBj 24.00: BBjInputTSpinner added.
  • 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-spinner

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