bbbfly. Button class control

new bbbfly.Button (def, ref, parent)

Basic button Control. Implements Hintified interface if hint package is inluded.

Parameters

Name Type Description
def bbbfly.Button.Definition optional Descendant definition
ref object optional Reference owner
parent object | string optional Parent DIV element or it's ID

Properties

Name Type Default Description
Text string null Text string
TextRes string null Text resource ID
TextAlign bbbfly.Button.textalign left
Icon boolean | bbbfly.Renderer.image null Icon definition Define define or set it to true before button creation to support icon
IconAlign bbbfly.Button.iconalign left
Indent bbbfly.Button.indent null
AutoSize bbbfly.Button.autosize none
SelectType bbbfly.Button.selecttype none
MultiLine boolean false

Extends

Implements

In Packages

Type Definitions

indent object

Possible values for bbbfly.Button.Indent
Properties:
Name Type Description
L px optional Gap between left frame and content
T px optional Gap between top frame and content
R px optional Gap between right frame and content
B px optional Gap between bottom frame and content
I px optional Gap between icon and text

Interfaces

Members

static autosize enum bitmask

Possible values for bbbfly.Button.AutoSize
Name Type Default Description
none bitmask 0
horizontal bitmask 1
vertical bitmask 2
both bitmask 3

static iconalign enum integer

Possible values for bbbfly.Button.IconAlign
Name Type Default Description
left integer 1
top integer 2
right integer 3
bottom integer 4

static selecttype enum bitmask

Possible values for bbbfly.Button.SelectType
Name Type Default Description
none bitmask 0
click bitmask 1
dblclick bitmask 2
both bitmask 3

static textalign enum integer

Possible values for bbbfly.Button.TextAlign
Name Type Default Description
left integer 1
center integer 2
right integer 3

Methods

inherited AddChildControl (ctrl)

Parameters:
Name Type Description
ctrl ngControl optional Child control reference
See:

Click (event)

Parameters:
Name Type Description
event MouseEvent
See:

inherited CreateControl (def){object|null}

Parameters:
Name Type Description
def ngControl.Definition optional Child control definition
See:
Returns:
Type Description
object | null Created control

DblClick (event)

Parameters:
Name Type Description
event MouseEvent
See:

inherited DisposeControls ()

See:

inherited GetAlt (){string|null}

See:
Returns:
Type Description
string | null

inherited GetClassName (suffix){string}

Parameters:
Name Type Description
suffix string optional Control part class name
Returns:
Type Description
string Control class name

inherited GetControlsHolder (){object}

See:
Returns:
Type Description
object ControlsPanel control or self

inherited GetControlsPanel (){object|null}

See:
Returns:
Type Description
object | null ControlsPanel control

inherited GetFrame (){bbbfly.Renderer.frame}

Returns:
Type Description
bbbfly.Renderer.frame Frame definition

inherited GetFrameDims (){object}

Returns:
Type Description
object Frame dimensions

inherited GetFramePanel (){object|null}

See:
Returns:
Type Description
object | null FramePanel control

GetIcon (){bbbfly.Renderer.image}

Returns:
Type Description
bbbfly.Renderer.image Icon definition

inherited GetState (){bbbfly.Renderer.state}

Returns:
Type Description
bbbfly.Renderer.state Control state

GetText (){string|null}

Returns:
Type Description
string | null

HasClick (){boolean}

See:
Returns:
Type Description
boolean If has active click action

HasDblClick (){boolean}

See:
Returns:
Type Description
boolean If has active double click action

inherited RemoveChildControl (ctrl)

Parameters:
Name Type Description
ctrl ngControl optional Child control reference
See:

inherited SetAlt (alt, update)

Parameters:
Name Type Default Description
alt string | null Value to set
update boolean true optional If update control
See:

inherited SetEnabled (enabled, update){boolean}

Parameters:
Name Type Default Description
enabled boolean true optional Value to set
update boolean true optional If update control
See:
Returns:
Type Description
boolean False if change was denied

inherited SetInvalid (invalid, update){boolean}

Parameters:
Name Type Default Description
invalid boolean true optional Value to set
update boolean true optional If update control
See:
Returns:
Type Description
boolean False if change was denied

inherited SetOverflow (overflowX, overflowY, update){boolean}

Parameters:
Name Type Default Description
overflowX bbbfly.Renderer.overflow hidden optional Horizontal value to set
overflowY bbbfly.Renderer.overflow hidden optional Vertical value to set
update boolean true optional If update control
See:
Returns:
Type Description
boolean False if change was denied

inherited SetReadOnly (readonly, update){boolean}

Parameters:
Name Type Default Description
readonly boolean true optional Value to set
update boolean true optional If update control
See:
Returns:
Type Description
boolean False if change was denied

inherited SetSelected (selected, update){boolean}

Parameters:
Name Type Default Description
selected boolean true optional Value to set
update boolean true optional If update control
See:
Returns:
Type Description
boolean False if change was denied

SetText (text, update)

Parameters:
Name Type Default Description
text string | null
update boolean true optional

inherited TrackChildControls ()

inherited TrackControl (ctrl, track)

Parameters:
Name Type Default Description
ctrl ngControl optional Tracked control reference
track boolean true optional Pass false to cancel tracking

Events

inherited IsTrackedControlChanged (ctrl, options)

Parameters:
Name Type Description
ctrl ngControl optional Tracked control reference
options object optional Per tracker options
See:

inherited OnChildControlAdded (ctrl)

Parameters:
Name Type Description
ctrl ngControl optional Child control reference
See:

inherited OnChildControlRemoved (ctrl)

Parameters:
Name Type Description
ctrl ngControl optional Child control reference
See:

OnClick (event)

Parameters:
Name Type Description
event MouseEvent
See:

OnDblClick (event)

Parameters:
Name Type Description
event MouseEvent
See:

inherited OnEnabledChanged ()

See:

inherited OnInvalidChanged ()

See:

inherited OnOverflowChanged ()

See:

inherited OnReadOnlyChanged ()

See:

inherited OnSelectedChanged ()

See:

inherited OnSetAlt (alt, update){boolean}

Parameters:
Name Type Default Description
alt boolean Value to set
update boolean true optional If update control
See:
Returns:
Type Description
boolean Return false to deny value change

inherited OnSetEnabled (enabled){boolean}

Parameters:
Name Type Description
enabled boolean Value to set
See:
Returns:
Type Description
boolean Return false to deny value change

inherited OnSetInvalid (invalid){boolean}

Parameters:
Name Type Description
invalid boolean Value to set
See:
Returns:
Type Description
boolean Return false to deny value change

inherited OnSetOverflow (overflowX, overflowY){boolean}

Parameters:
Name Type Description
overflowX bbbfly.Renderer.overflow optional Horizontal value to set
overflowY bbbfly.Renderer.overflow optional Vertical value to set
See:
Returns:
Type Description
boolean Return false to deny values change

inherited OnSetReadOnly (readonly){boolean}

Parameters:
Name Type Description
readonly boolean Value to set
See:
Returns:
Type Description
boolean Return false to deny value change

inherited OnSetSelected (selected){boolean}

Parameters:
Name Type Description
selected boolean Value to set
See:
Returns:
Type Description
boolean Return false to deny value change

inherited OnTrackedControlChanged (ctrl)

Parameters:
Name Type Description
ctrl ngControl optional Tracked control reference