Class Control

(line 72)

Description

Object
   |
   --Persistent
      |
      --Component
         |
         --Control

Located in File: /controls.inc.php

Control is the base class for all components that are visible at runtime.

Controls are visual components, meaning the user can see them and possibly interact with them at runtime. All controls have properties, methods, and events that describe aspects of their appearance, such as the position of the control, the cursor or hint associated with the control, methods to paint or move the control, and events that respond to user actions.

Control has many protected properties and methods that are used or published by its descendants.



Classes extended from Control:
TrackBar
Use TrackBar to put a track bar on a form. A track bar represents a position along a continuum using a slider and, optionally, tick marks.
FocusControl
Base class for controls with input focus.
GraphicControl
Base class for controls with graphic capabilities.
DBIteratorBegin
Creates/begins a section on a templated form
DBIteratorEnd
Closes/ends a section on a templated form
MapShape
Encapsulates a shape for images, to create mapped images.
Shape
Shape represents a geometric shape that can be drawn on a form.
PaintBox
PaintBox provides a canvas that applications can use for rendering an image.
HiddenField
A component to generate an html hidden field.
GoogleMap
Provides a wrapper over the Google Maps API
JQSlider
This component provides a slider for information
Pager
A control to paginate sets of data and adapted to work with datasets also
PearDataGrid
This grid uses PEAR objects to provide tabular information

Properties

Summary:
Cached
Cursor Change the value of Cursor to provide feedback to the user when the mouse pointer enters the control.
Height Specifies the vertical size of the control or form in pixels.
Hint Specifies the text to show in a tooltip when the mouse is over the control for some time.
HintAttribute If control has any Hint, then returns the hint in attribute format for the tag.
Layer Determines the layer in which this control is going to be rendered.
Left Uses the Left property to determine where the left side of the control begins, or to reposition the left side of the control.
Top Uses Top to locate the top of the control, or reposition the control to a different Y coordinate.
Width Specifies the horizontal size of the control or form in pixels.
AdjustToLayout A helper property for Layouts to know if the component should adjust to the layout or not
Align Determines how the control aligns within its container (parent control).
Alignment Specifies the alignment to be used by the control, it depends on the control on how to use this property to show information.
Attributes A property for tag based controls to allow component user to add attributes to the tag
Autosize Determines if the control is going to adjust itself to the parent size
Caption Specifies a text string that identifies the control to the user.
Color Specifies the main color of the control.
ControlStyle An array which holds the control style, with settings for the IDE.
DesignColor Specifies a color to use by the control at design time.
DivWrap Specifies if the control must be wrapped by a div or not
DoParentReset Performs a parent reset if true.
Enabled Controls whether the control responds to mouse, keyboard, and timer events.
Font Determines the Font to be used when generating this control.
Hidden This property, when true, allows controls to generate all code, but don't show the control on the browser.
IsLayer Specifies if this control is a Layer instead of being integrated into the document.
JsEvents Returns a string with all assigned javascript events, ready to be added to a control tag.
JSWrapperHiddenFieldName Gets the name of the hidden field used to submit the value for the event that was fired.
Parent Indicates the parent of the control.
ParentColor Determines where a control looks for its color information.
ParentFont Determines where a control looks for its font information.
ParentShowHint Determines where a control looks to find out if its Help Hint should be shown.
PopupMenu Identifies the pop-up menu associated with the control.
ShowHint Determines whether the control displays a Help Hint when the mouse pointer rests momentarily on the control.
Style Use this property to attach a css style to the control.
StyleClass Normalizes the css style class name
Visible Determines whether the component appears on the browser.

Defined in class Component

Name Specifies the name for the component. The name is used as an identifier and should be unique.
Tag A versatile property of every Component that can be used in any way you want
ComponentCount Indicates the number of components owned by the component.
Components Lists all the components owned by this component.
ControlState A flag to know the state of the control, csLoading, csDesigning
DataFieldValue This property returns the value of the datafield if any.
NamePath Specifies the path to uniquely identify a component, qualified by the owner when required.
Owner Indicates the component that is responsible for streaming and freeing this component.

Defined in class Persistent

NamePath Used to serialize/unserialize. It returns the full path to identify this component.
Owner Owner of the component.

property Cached (line 1187)

void Cached


property Cursor (line 2133)

enum Cursor

Change the value of Cursor to provide feedback to the user when the mouse pointer enters the control.

The value of Cursor is one of the available cursors for the browser, in the IDE you have a drop-down list to select a valid value for this property, which can be one of the following:

crPointer - The cursor is a pointer that indicates a link.

crCrossHair - A simple crosshair (e.g., short line segments resembling a "+" sign).

crText - Indicates text that may be selected. Often rendered as an I-bar.

crWait - Indicates that the program is busy and the user should wait. Often rendered as a watch or hourglass.

crDefault - The platform-dependent default cursor. Often rendered as an arrow.

crHelp - Help is available for the object under the cursor. Often rendered as a question mark or a balloon.

crEResize - Indicate that some edge is to be moved. For example, the 'se-resize' cursor is used when the movement starts from the south-east corner of the box.

crNEResize - Indicate that some edge is to be moved. For example, the 'se-resize' cursor is used when the movement starts from the south-east corner of the box.

crNResize - Indicate that some edge is to be moved. For example, the 'se-resize' cursor is used when the movement starts from the south-east corner of the box.

crNWResize - Indicate that some edge is to be moved. For example, the 'se-resize' cursor is used when the movement starts from the south-east corner of the box.

crWResize - Indicate that some edge is to be moved. For example, the 'se-resize' cursor is used when the movement starts from the south-east corner of the box.

crSWResize - Indicate that some edge is to be moved. For example, the 'se-resize' cursor is used when the movement starts from the south-east corner of the box.

crSResize - Indicate that some edge is to be moved. For example, the 'se-resize' cursor is used when the movement starts from the south-east corner of the box.

crSEResize - Indicate that some edge is to be moved. For example, the 'se-resize' cursor is used when the movement starts from the south-east corner of the box.

crAuto - The UA determines the cursor to display based on the current context.


property Height (line 2089)

int Height

Specifies the vertical size of the control or form in pixels.

Use the Height property to read or change the height of the control.

Info


property Hint (line 2158)

string Hint

Specifies the text to show in a tooltip when the mouse is over the control for some time.

Use the Hint property to provide a string of help text, either as a Help Hint or as help text on a particular location such as a status bar.

A Help Hint is a box containing help text that appears for a control when the user moves the mouse pointer over the control and pauses momentarily.

To set up Help Hints:

Specify the Hint property of each control for which a Help Hint should appear.

Set the ShowHint property of each appropriate control to true, or set the ParentShowHint property of all controls to true and set the ShowHint property of the form to true.

Info


property HintAttribute (line 1060)

string HintAttribute

If control has any Hint, then returns the hint in attribute format for the tag.

This function returns the attribute for the hint that can be included in any tag. The attribute's name is "title". If the hint is defined and can be shown a is string with the attribute, otherwise an empty string.

Info


property Layer (line 1658)

mixed Layer

Determines the layer in which this control is going to be rendered.

This property must match with the ActiveLayer property of the parent control for the component to be shown. It allows you to create stacked interfaces and then switch the active stack by changing ActiveLayer.

If parent control does not implement ActiveLayer, you do not have to worry about this property.

Info

  • see - FocusControl::ActiveLayer

property Left (line 2047)

int Left

Uses the Left property to determine where the left side of the control begins, or to reposition the left side of the control.

If the control is contained in another control, the Left and Top properties are relative to the parent control. If the control is contained directly by the form, the property values are relative to the form. For forms, the value of the Left property is always 0.

Info


property Top (line 2065)

int Top

Uses Top to locate the top of the control, or reposition the control to a different Y coordinate.

The Top property, like the Left property, is the position of the control relative to its container. Thus, if a control is contained in a Panel, the Left and Top properties are relative to the panel. If the control is contained directly by the form, it is relative to the form. For forms, the value of the Top property is always 0

Info


property Width (line 2077)

int Width

Specifies the horizontal size of the control or form in pixels.

Use the Width property to read or change the width of the control.

Info


property AdjustToLayout (line 699)

boolean AdjustToLayout

A helper property for Layouts to know if the component should adjust to the layout or not

If true, the control should adjust to the selected layout. This property can be used by a Layout component to render the component it contains.

Info


property Align (line 1670)

enum Align

Determines how the control aligns within its container (parent control).

In the current implementation, is only used in a few controls. The goal is to replicate the Align model present in VCL for Windows in VCL for PHP.


property Alignment (line 1684)

enum Alignment

Specifies the alignment to be used by the control, it depends on the control on how to use this property to show information.

For example, Label uses it to align the text to show. If you are a component developer, you can implement this property and use it to change the alignment of information.


property Attributes (line 746)

array Attributes

A property for tag based controls to allow component user to add attributes to the tag

This is an array property you can use to specify, for tag based controls, some extra attributes to be included in the tag generation.


property Autosize (line 714)

boolean Autosize

Determines if the control is going to adjust itself to the parent size

This property can be used by component developers to generate code that adjusts to the size of the parent cell/div/etc. It's useful for templated forms.


property Caption (line 1400)

string Caption

Specifies a text string that identifies the control to the user.

Use Caption to specify the text string that labels the control.

Caption property which is defined in the Control class. If used by the control, is in sync with the Name when the control is first dropped on the designer. The usage of this property depends on the component, for example, Caption for Button components is the text inside the button while for Page components, is the title of the HTML document.

Note: Controls that display text use either the Caption property or the Text property to specify the text value. Which property is used depends on the type of control. In general, Caption is used for text that appears as a window title or label, while Text is used for text that appears as the content of a control.

Info

  • access - protected

property Color (line 1424)

string Color

Specifies the main color of the control.

Color property, defined in Control class, usually define the main color for the component, it's responsability of the component developer to use the property to generate the appropiate code and reflect the color setting. This property follows the HTML/CSS color specification, for example: #FF0000 -> red color or can also be "red"

If a control's ParentColor property is true, then changing the Color property of the control's parent automatically changes the Color property of the control. When the value of the Color property is changed, the control's ParentColor property is automatically set to false.

Info


property ControlStyle (line 1978)

array ControlStyle

An array which holds the control style, with settings for the IDE.

Valid settings are:

csAcceptsControls - Indicates to the IDE this control accepts children controls inside.

csImageContent - Indicates to the IDE the content dumped by this component is image binary data.

csSlowRedraw - Indicates to the IDE this component uses javascript and needs more time to get repainted.

csVerySlowRedraw - Indicates to the IDE this component uses javascript and needs a lot more time to get repainted.

csRenderOwner - Indicates to the IDE to render the Owner along with the control.

csDesignEncoding - Indicates to the IDE to use a different encoding for the HTML produced by the component.

csRenderAlso - Indicates to the IDE to also render components of a specific class.

csTopOffset - Indicates to the IDE to capture the control image from different coordinates.

csLeftOffset - Indicates to the IDE to capture the control image from different coordinates.

csTemplateOutput - Indicates this component produces output valid for a template


property DesignColor (line 1701)

string DesignColor

Specifies a color to use by the control at design time.

This is a property a component developer can use to simplify the design of controls. The goal is that this property is only used at design-time. For example, Label control uses it to allow you set a background color which will only be visible at design-time, so you can freely set the Font color and still see the contents.

Info


property DivWrap (line 729)

boolean DivWrap

Specifies if the control must be wrapped by a div or not

Use this property to specify if the control must be wrapped by a div or not. The usage of this property is leave to the component developer discretion.


property DoParentReset (line 1380)

boolean DoParentReset

Performs a parent reset if true.

property Enabled (line 1467)

boolean Enabled

Controls whether the control responds to mouse, keyboard, and timer events.

Use Enabled to change the availability of the control to the user. To disable a control, set Enabled to false. Disabled controls appear dimmed. If Enabled is false, the control ignores mouse, keyboard, and timer events.

To re-enable a control, set Enabled to true. The control is no longer dimmed, and the user can use the control.

Disabled controls must not react to user interaction and must show a different color or aspect to specify that to the user. Do not confuse this with ReadOnly properties, as ReadOnly controls may allow the user to copy information. Disabled controls do not allow any operations with it.

Info


property Font (line 1549)

Font Font

Determines the Font to be used when generating this control.

This property is an object property, so you can individually set specific attributes for it, for example, Font->Color.

In the IDE, this property shows a list of all properties of Font class so you can set them individually

Checks the Style property also, as that property also influences the aspect of the Control.

Info


property Hidden (line 764)

boolean Hidden

This property, when true, allows controls to generate all code, but don't show the control on the browser.

You can use this property to specify the control should not be shown on the browser, but the code for it will be generated, this is useful if you want to use javascript code to make the control visible.

Info


property IsLayer (line 1587)

boolean IsLayer

Specifies if this control is a Layer instead of being integrated into the document.

If true, control will be generated into a div tag and won't visible when the application is executed. You will need to use Javascript events to show it.

This is useful for creating hover areas. For example, on a Panel containing controls, if IsLayer is true, you can write javascript code on the OnMouseOver javascript event of a Button to show that layer so you get a nice effect.

Info


property JsEvents (line 853)

string JsEvents

Returns a string with all assigned javascript events, ready to be added to a control tag.

Returns assigned javascript events as attributes for the tag. This function is useful to get the tags to assign javascript events to the right code.

Info


property JSWrapperHiddenFieldName (line 1351)

string JSWrapperHiddenFieldName

Gets the name of the hidden field used to submit the value for the event that was fired.

There should be one hidden field for each component that can forward JS events to the PHP script. It is the responsiblity of the component to add this field.

Info


property Parent (line 1933)

FocusControl Parent

Indicates the parent of the control.

Use the Parent property to get or set the parent of this control. The parent of a control is the control that contains the control. For example, if an application includes three radio buttons in a group box, the group box is the parent of the three radio buttons, and the radio buttons are the child controls of the group box.

To serve as a parent, a control must be an instance of a descendant of FocusControl.

When creating a new control at runtime, assign a Parent property value for the new control. Usually, this is a form, panel, group box, or some control that is designed to contain another. Changing the parent of a control moves the control on the browser so that it is displayed within the new parent. When the parent control moves, the child moves with the parent.

Info


property ParentColor (line 1506)

boolean ParentColor

Determines where a control looks for its color information.

To have a control use the same color as its parent control, set ParentColor to true. If ParentColor is false, the control uses its own Color property.

Set ParentColor to true for all controls in order to ensure that all the controls on a form have a uniform appearance. For example, if ParentColor is true for all controls in a form, changing the background color of the form to gray causes all the controls on the form to also have a gray background.

When the value of a control's Color property changes, ParentColor becomes false automatically.

Info


property ParentFont (line 1609)

boolean ParentFont

Determines where a control looks for its font information.

To have a control use the same font as its parent control, set ParentFont to true. If ParentFont is false, the control uses its own Font property.

Many controls default ParentFont to true so that all the controls in a form or other container present a uniform appearance. When the value of a control's Font property changes, ParentFont becomes false automatically.

When ParentFont is true for a form, the form uses the default font.

Info


property ParentShowHint (line 1779)

boolean ParentShowHint

Determines where a control looks to find out if its Help Hint should be shown.

Use ParentShowHint to ensure that all the controls on a form either uniformly show their Help Hints or uniformly do not show them.

If ParentShowHint is true, the control uses the ShowHint property value of its parent. If ParentShowHint is false, the control uses the value of its own ShowHint property.

To provide Help Hints for only selected controls on a form, set the ShowHint property to true for those controls that should have Help Hints. ParentShowHint becomes false automatically.

Note: Enable or disable all Help Hints for the entire application using the ShowHint property of the application object.

Info


property PopupMenu (line 1483)

PopupMenu PopupMenu

Identifies the pop-up menu associated with the control.

Assign a value to PopupMenu to make a pop-up menu appear when the user selects the control and clicks the right mouse button.

The value for this property must be a PopupMenu component. If you are working on the IDE you will get a drop-down on the Object Inspector with valid values for it.

Info

  • access - protected

property ShowHint (line 1731)

boolean ShowHint

Determines whether the control displays a Help Hint when the mouse pointer rests momentarily on the control.

The Help Hint is the value of the Hint property, which is displayed in a box just beneath the control. Use ShowHint to determine whether a Help Hint appears for the control.

To enable Help Hint for a particular control, the application ShowHint property must be true and either:

the controls own ShowHint property must be true, or

the controls ParentShowHint property must be true and its parent's ShowHint property must be true.

For example, imagine a check box within a group box. If the ShowHint property of the group box is true and the ParentShowHint property of the check box is true, but the ShowHint property of the check box is false, the check box still displays its Help Hint.

Changing the ShowHint value automatically sets the ParentShowHint property to false. Also checks the Hint property, which specifies the text to be shown.

Info


property Style (line 683)

string Style

Use this property to attach a css style to the control.

CSS style to be used when rendering the component, the style must be included in a .css file referenced by the Page component. You can use OnShowHeader to write the code to include the stylesheet or use the StyleSheet component. Using the StyleSheet component you will be able to see the style rendered in design-time, and this property will be shown as a drop-down with the styles available in the linked stylesheet

Info


property StyleClass (line 777)

string StyleClass

Normalizes the css style class name

Return the normalized CSS style without the starting dot if any.

Info


property Visible (line 1907)

boolean Visible

Determines whether the component appears on the browser.

This property determines if the control is visible at run-time or not. Use it to hide this control when generating the page. Note: The behaviour can be different than in VCL for Windows. Since the control uses javascript to get rendered, you might not be able to access it using javascript as the code won't be generated.

If you want to get a control code on the browser but not being visible, you should use javascript to hide the control.

Info


property Name

Specifies the name for the component. The name is used as an identifier and should be unique.
This property is implemented in Component::Name

property Tag

A versatile property of every Component that can be used in any way you want
This property is implemented in Component::Tag

property ComponentCount

Indicates the number of components owned by the component.
This property is implemented in Component::ComponentCount

property Components

Lists all the components owned by this component.
This property is implemented in Component::Components

property ControlState

A flag to know the state of the control, csLoading, csDesigning
This property is implemented in Component::ControlState

property DataFieldValue

This property returns the value of the datafield if any.
This property is implemented in Component::DataFieldValue

property NamePath

Specifies the path to uniquely identify a component, qualified by the owner when required.
This property is implemented in Component::NamePath

property Owner

Indicates the component that is responsible for streaming and freeing this component.
This property is implemented in Component::Owner

property NamePath

Used to serialize/unserialize. It returns the full path to identify this component.
This property is implemented in Persistent::NamePath

property Owner

Owner of the component.
This property is implemented in Persistent::Owner

Methods

Summary:
__construct Component constructor [Overrides Component::__construct()]
addJSWrapperToEvents Adds or replaces the JS event attribute with the wrapper.
beginCache
canShow Determines whether a control can be shown or not.
dumpChildren Dumps all children components.
dumpContents Dumps the control contents.
dumpHeaderCode Dumps header code required [Overrides Component::dumpHeaderCode()]
dumpJavascript Dumps the javascript code needed by this component [Overrides Component::dumpJavascript()]
dumpJsEvents Dumps all assigned javascript events code.
endCache
init Initializes a component [Overrides Component::init()]
loaded Initializes the component after the form file has been read into memory. [Overrides Component::loaded()]
show Dumps the code for the control to the output.
updateParentColor If ParentColor == true the parent's color is assigned to this control.
updateParentFont If ParentFont == true the parent's font is assigned to this control.
updateParentProperties Updates all properties that use the parent property as source.
updateParentShowHint If ParentShowHint == true the parent's showhint is assigned to this control.

Defined in class Component

dumpChildrenJavascript Dumps the javascript code for all the children
dumpFormItems Dumps code just after the form tag, useful to dump hidden fields for state retrieving for non visible components
dumpHeaderCode Dumps header code required
dumpJavascript Dumps the javascript code needed by this component
hasValidDataField Returns true if a valid data field is attached to the component
init Initializes a component
loaded Initializes the component after the form file has been read into memory.
loadedChildren Calls childrens loaded
preinit Method called before init()
serializeChildren Serializes all children
unserializeChildren Unserializes all children by calling unserialize for all the components

Defined in class Persistent

serialize Stores this object into the session.
unserialize This method uses PHP reflection to iterate through published properties (the ones starting with get) and retrieve the properties stored by a previous serialize() call.

Defined in class Object

__construct Constructs an object and initializes its data before the object is first used.
className Returns a string indicating the type of the object instance (as opposed to the type of the variable passed as an argument).
classParent Returns the type of the immediate ancestor of a class.

Constructor __construct (line 796)

Control __construct( [$aowner $aowner = null])

Overrides : Component::__construct() Component constructor


Method addJSWrapperToEvents (line 1249)

void addJSWrapperToEvents( &$events, string $event, string $jsEvent, string $jsEventAttr, string $events)

Adds or replaces the JS event attribute with the wrapper.

The wrapper is used to notify the PHP script that an event occured. The script then may fire an event itself (for example OnClick of a button).

Parameters

  • string $events: A string that is empty or contains already existing JS event-handlers. This string passed by reference.
  • string $event: String representation of the event (ex. $this->_onclick;)
  • string $jsEvent: String representation of the JS event (ex. $this->_jsonclick;)
  • string $jsEventAttr: Name of attribute for the JS event (ex. "onclick")
  • &$events:

Info


Method beginCache (line 1076)

void beginCache( $type)

Parameters

  • $type:

Method canShow (line 826)

boolean canShow( )

Determines whether a control can be shown or not.

A control can be shown if it has no parent and its Visible property is true.

If it has a parent:

-if parent has Layer handling properties, checks Visible property if Parent can be shown and Layer matches with the Activelayer.

-else, checks the visible property and if the parent can be shown.

Info

  • return - True if the control can be shown, false otherwise
  • see - getVisible, Control::Parent

Method dumpChildren (line 1202)

void dumpChildren( )

Dumps all children components.

This method iterates through all the children list, dumping all of them to the output using the show method.

Info


Method dumpContents (line 1227)

void dumpContents( )

Dumps the control contents.

Inherit and fill this method with the code your control must generate. This is one of the main methods in the VCL for PHP as it is responsible for generating the code for the controls. When developing components, you should override this method and write your component code here.

  1.  <?php
  2.       function dumpContents()
  3.       {
  4.           echo "<table width=\"100%\"><tr><td>Hello, my component!</td></tr></table>";
  5.       }
  6.  ?>

Info


Method dumpHeaderCode (line 1026)

void dumpHeaderCode( )

Overrides : Component::dumpHeaderCode() Dumps header code required


Method dumpJavascript (line 987)

void dumpJavascript( )

Overrides : Component::dumpJavascript() Dumps the javascript code needed by this component


Method dumpJsEvents (line 925)

void dumpJsEvents( )

Dumps all assigned javascript events code.

Dumps Javascript events. This method is called by the Page component to dump in the <head> section of the document all the javascript functions containing the code the user has written. Control class dumps the standard HTML javascript events. You can override it to dump yours.

Don't forget to call the parent:: method if you want the standard ones to get dumped.

Info


Method endCache (line 1105)

void endCache( )


Method init (line 1986)

void init( )

Overrides : Component::init() Initializes a component


Method loaded (line 805)

void loaded( )

Overrides : Component::loaded() Initializes the component after the form file has been read into memory.


Method show (line 1149)

mixed show( [boolean $return_contents = false])

Dumps the code for the control to the output.

Shows control contents. You can use this method to show the contents of the control, optionally, by setting $return_contents to true. You can get the contents of the control returned instead of having it dumped to the output.

This method also checks if the global var has $output_enabled. You can globally disable output of controls by setting that var to false.

This method is also responsible to call beforeshow and aftershow events

Parameters

  • boolean $return_contents: return contents as string or dumps to output

Info


Method updateParentColor (line 1855)

void updateParentColor( )

If ParentColor == true the parent's color is assigned to this control.

Info


Method updateParentFont (line 1833)

void updateParentFont( )

If ParentFont == true the parent's font is assigned to this control.

Info


Method updateParentProperties (line 1817)

void updateParentProperties( )

Updates all properties that use the parent property as source.

You don't need to call this method, is called by Control to update all properties that have a Parent relative.

These include ShowHint, Color and Font.

Info


Method updateParentShowHint (line 1877)

void updateParentShowHint( )

If ParentShowHint == true the parent's showhint is assigned to this control.

Info


Events

Summary:
OnAfterShow Fires the Event after showing the control.
OnBeforeShow Fires the Event before showing the control.
OnShow Fires the Event at the same moment the control is shown. Some controls can prevent the control from being shown when this event is attached.

property OnAfterShow (line 2175)

mixed OnAfterShow

Fires the Event after showing the control.

property OnBeforeShow (line 2167)

mixed OnBeforeShow

Fires the Event before showing the control.

property OnShow (line 2184)

mixed OnShow

Fires the Event at the same moment the control is shown. Some controls can prevent the control from being shown when this event is attached.

Javascript Events

Summary:
OnActivate Fires when the object is set as the active element.
OnBeforeCopy Fires on the source object before the selection is copied to the system clipboard.
OnBeforeCut Fires on the source object before the selection is deleted from the document.
OnBeforeDeactivate Fires immediately before the activeElement is changed from the current object to another object in the parent document.
OnBeforeEditfocus Fires before an object contained in an editable element enters a UI-activated state or when an editable container object is control selected.
OnBeforePaste Fires on the target object before the selection is pasted from the system clipboard to the document.
OnBlur Fires when the object loses the input focus.
OnChange Fires when the contents of the object or selection have changed.
OnClick Fires when the user clicks the left mouse button on the object.
OnContextMenu Fires when the user clicks the right mouse button in the client area, opening the context menu.
OnControlSelect Fires when the user is about to make a control selection of the object.
OnCopy Fires on the source element when the user copies the object or selection, adding it to the system clipboard.
OnCut Fires on the source element when the object or selection is removed from the document and added to the system clipboard.
OnDblClick Fires when the user double-clicks the object.
OnDeActivate Fires when the activeElement is changed from the current object to another object in the parent document.
OnDrag Fires on the source object continuously during a drag operation.
OnDragEnter Fires on the target element when the user drags the object to a valid drop target.
OnDragLeave Fires on the target object when the user moves the mouse out of a valid drop target during a drag operation.
OnDragOver Fires on the target element continuously while the user drags the object over a valid drop target.
OnDragStart Fires on the source object when the user starts to drag a text selection or selected object.
OnDrop Fires on the target object when the mouse button is released during a drag-and-drop operation.
OnFilterChange Fires when a visual filter changes state or completes a transition.
OnFocus Fires when the object receives focus.
OnHelp Fires when the user presses the F1 key while the browser is the active window.
OnKeyDown Fires when the user presses a key.
OnKeyPress Fires when the user presses an alphanumeric key.
OnKeyUp Fires when the user releases a key.
OnLoseCapture Fires when the object loses the mouse capture.
OnMouseDown Fires when the user clicks the object with either mouse button.
OnMouseEnter Fires when the user moves the mouse pointer into the object.
OnMouseLeave Fires when the user moves the mouse pointer outside the boundaries of the object.
OnMouseMove Fires when the user moves the mouse over the object.
OnMouseOut Fires when the user moves the mouse pointer outside the boundaries of the object.
OnMouseOver Fires when the user moves the mouse pointer into the object.
OnMouseUp Fires when the user releases a mouse button while the mouse is over the object.
OnPaste Fires on the target object when the user pastes data, transferring the data from the system clipboard to the document.
OnPropertyChange Fires when a property changes on the object.
OnReadyStateChange Fires when the state of the object has changed.
OnResize Fires when the size of the object is about to change.
OnResizeEnd Fires when the user finishes changing the dimensions of the object in a control selection.
OnResizeStart Fires when the user begins to change the dimensions of the object in a control selection
OnSelectStart Fires when the object is being selected

property OnActivate (line 158)

mixed OnActivate

Fires when the object is set as the active element.

This event is fired when the user click an element, other than the active element of the document, or use the keyboard to move focus from the active element to another element. Also can be fired if the script invokes the setActive method on an element, when the element is not the active element.

Info

  • access - protected

property OnBeforeCopy (line 180)

mixed OnBeforeCopy

Fires on the source object before the selection is copied to the system clipboard.

Is fired if the user right-click to display the shortcut menu and select Copy or presses CTRL+C.

Info

  • access - protected

property OnBeforeCut (line 190)

mixed OnBeforeCut

Fires on the source object before the selection is deleted from the document.

Is fired if the user right-click to display the shortcut menu and select Cut or presses CTRL+X.

Info

  • access - protected

property OnBeforeDeactivate (line 202)

mixed OnBeforeDeactivate

Fires immediately before the activeElement is changed from the current object to another object in the parent document.

This event is fired when the user click an element, other than the active element of the document, or use the keyboard to move focus from the active element to another element. Also can be fired if the script invokes the setActive method on an element, when the element is not the active element.

Info

  • access - protected

property OnBeforeEditfocus (line 214)

mixed OnBeforeEditfocus

Fires before an object contained in an editable element enters a UI-activated state or when an editable container object is control selected.

To invoke this event, press the ENTER key or click an object when it has focus or double-click an object. The onbeforeeditfocus event differs from the onfocus event. The onbeforeeditfocus event fires before an object enters a UI-activated state, whereas the onfocus event fires when an object has focus.

Info

  • access - protected

property OnBeforePaste (line 224)

mixed OnBeforePaste

Fires on the target object before the selection is pasted from the system clipboard to the document.

Is fired if the user right-click to display the shortcut menu and select Paste or presses CTRL+V.

Info

  • access - protected

property OnBlur (line 238)

mixed OnBlur

Fires when the object loses the input focus.

The onblur event fires on the original object before the onfocus or onclick event fires on the object that is receiving focus. Where applicable, the onblur event fires after the onchange event.

Use the focus events to determine when to prepare an object to receive or validate input from the user.

Info

  • access - protected

property OnChange (line 252)

mixed OnChange

Fires when the contents of the object or selection have changed.

This event is fired when the contents are committed and not while the value is changing. For example, on a text box, this event is not fired while the user is typing, but rather when the user commits the change by leaving the text box that has focus. In addition, this event is executed before the code specified by onblur when the control is also losing the focus.

Info

  • access - protected

property OnClick (line 265)

mixed OnClick

Fires when the user clicks the left mouse button on the object.

If the user clicks the left mouse button, the onclick event for an object occurs only if the mouse pointer is over the object and an onmousedown and an onmouseup event occur in that order. For example, if the user clicks the mouse on the object but moves the mouse pointer away from the object before releasing, no onclick event occurs.

Info

  • access - protected

property OnContextMenu (line 273)

mixed OnContextMenu

Fires when the user clicks the right mouse button in the client area, opening the context menu.

Info

  • access - protected

property OnControlSelect (line 283)

mixed OnControlSelect

Fires when the user is about to make a control selection of the object.

This event fires before the element is selected, so inspecting the selection object gives no information about the element to be selected.

Info

  • access - protected

property OnCopy (line 293)

mixed OnCopy

Fires on the source element when the user copies the object or selection, adding it to the system clipboard.

Is fired if the user right-click to display the shortcut menu and select Copy or presses CTRL+C.

Info

  • access - protected

property OnCut (line 303)

mixed OnCut

Fires on the source element when the object or selection is removed from the document and added to the system clipboard.

Is fired if the user right-click to display the shortcut menu and select Cut or presses CTRL+X.

Info

  • access - protected

property OnDblClick (line 313)

mixed OnDblClick

Fires when the user double-clicks the object.

The order of events leading to the ondblclick event is onmousedown, onmouseup, onclick, onmouseup, and then ondblclick.

Info

  • access - protected

property OnDeActivate (line 170)

mixed OnDeActivate

Fires when the activeElement is changed from the current object to another object in the parent document.

This event is fired when the user click an element, other than the active element of the document, or use the keyboard to move focus from the active element to another element. Also can be fired if the script invokes the setActive method on an element, when the element is not the active element.

Info

  • access - protected

property OnDrag (line 324)

mixed OnDrag

Fires on the source object continuously during a drag operation.

This event fires on the source object after the ondragstart event. The ondrag event fires throughout the drag operation, whether the selection being dragged is over the drag source, a valid target, or an invalid target.

Info

  • access - protected

property OnDragEnter (line 335)

mixed OnDragEnter

Fires on the target element when the user drags the object to a valid drop target.

You can handle the ondragenter event on the source or on the target object. Of the target events, it is the first to fire during a drag operation.

Info

  • access - protected

property OnDragLeave (line 341)

mixed OnDragLeave

Fires on the target object when the user moves the mouse out of a valid drop target during a drag operation.

Info

  • access - protected

property OnDragOver (line 352)

mixed OnDragOver

Fires on the target element continuously while the user drags the object over a valid drop target.

The ondragover event fires on the target object after the ondragenter event has fired.

Info

  • access - protected

property OnDragStart (line 363)

mixed OnDragStart

Fires on the source object when the user starts to drag a text selection or selected object.

The ondragstart event is the first to fire when the user starts to drag the mouse.

Info

  • access - protected

property OnDrop (line 373)

mixed OnDrop

Fires on the target object when the mouse button is released during a drag-and-drop operation.

The ondrop event fires before the ondragleave and ondragend events.

Info

  • access - protected

property OnFilterChange (line 380)

mixed OnFilterChange

Fires when a visual filter changes state or completes a transition.

Info

  • access - protected

property OnFocus (line 393)

mixed OnFocus

Fires when the object receives focus.

When one object loses activation and another object becomes the activeElement, the onfocus event fires on the object becoming the activeElement only after the onblur event fires on the object losing activation. Use the focus events to determine when to prepare an object to receive input from the user.

Info

  • access - protected

property OnHelp (line 399)

mixed OnHelp

Fires when the user presses the F1 key while the browser is the active window.

Info

  • access - protected

property OnKeyDown (line 409)

mixed OnKeyDown

Fires when the user presses a key.

This event is specifically fired when the key is pressed down and is repeated multiple times until the key is released.

Info

  • access - protected

property OnKeyPress (line 419)

mixed OnKeyPress

Fires when the user presses an alphanumeric key.

This event can be used to detect key presses of standard keys, if you need to process other keys (like cursor keys), use jsOnKeyDown.

Info

  • access - protected

property OnKeyUp (line 429)

mixed OnKeyUp

Fires when the user releases a key.

This event is fired whenever a key pressed is released, both for keypress and keydown events.

Info

  • access - protected

property OnLoseCapture (line 434)

mixed OnLoseCapture

Fires when the object loses the mouse capture.

Info

  • access - protected

property OnMouseDown (line 445)

mixed OnMouseDown

Fires when the user clicks the object with either mouse button.

Use this event to detect when the mouse is pressed on an element, you can use the button property of the event to determine which mouse button is clicked.

Info

  • access - protected

property OnMouseEnter (line 467)

mixed OnMouseEnter

Fires when the user moves the mouse pointer into the object.

The event fires only if the mouse pointer is outside the boundaries of the object and the user moves the mouse pointer inside the boundaries of the object.

Info

  • access - protected

property OnMouseLeave (line 478)

mixed OnMouseLeave

Fires when the user moves the mouse pointer outside the boundaries of the object.

The event fires only if the mouse pointer is inside the boundaries of the object and the user moves the mouse pointer outside the boundaries of the object.

Info

  • access - protected

property OnMouseMove (line 488)

mixed OnMouseMove

Fires when the user moves the mouse over the object.

If the user presses a mouse button, use the button property to determine which button was pressed.

Info

  • access - protected

property OnMouseOut (line 500)

mixed OnMouseOut

Fires when the user moves the mouse pointer outside the boundaries of the object.

When the user moves the mouse over an object, one onmouseover event occurs, followed by one or more onmousemove events as the user moves the mouse pointer within the object. One onmouseout event occurs when the user moves the mouse pointer out of the object.

Info

  • access - protected

property OnMouseOver (line 511)

mixed OnMouseOver

Fires when the user moves the mouse pointer into the object.

The event occurs when the user moves the mouse pointer into the object, and it does not repeat unless the user moves the mouse pointer out of the object and then back into it.

Info

  • access - protected

property OnMouseUp (line 456)

mixed OnMouseUp

Fires when the user releases a mouse button while the mouse is over the object.

When any mouse button stops from being pressed over an element, this event is fired, you can use the button property to determine which mouse button is clicked.

Info

  • access - protected

property OnPaste (line 519)

mixed OnPaste

Fires on the target object when the user pastes data, transferring the data from the system clipboard to the document.

Info

  • access - protected

property OnPropertyChange (line 530)

mixed OnPropertyChange

Fires when a property changes on the object.

The onpropertychange event fires when properties of an object, expando, or style sub-object change. To retrieve the name of the changed property, use the event object's propertyName property.

Info

  • access - protected

property OnReadyStateChange (line 540)

mixed OnReadyStateChange

Fires when the state of the object has changed.

You can use the readyState property to query the current state of the element when the onreadystatechange event fires.

Info

  • access - protected

property OnResize (line 550)

mixed OnResize

Fires when the size of the object is about to change.

The onresize event fires for block and inline objects with layout, even if document or CSS (cascading style sheets) property values are changed.

Info

  • access - protected

property OnResizeEnd (line 560)

mixed OnResizeEnd

Fires when the user finishes changing the dimensions of the object in a control selection.

Only content editable objects can be included in a control selection.

Info

  • access - protected

property OnResizeStart (line 570)

mixed OnResizeStart

Fires when the user begins to change the dimensions of the object in a control selection

Only content editable objects can be included in a control selection.

Info

  • access - protected

property OnSelectStart (line 579)

mixed OnSelectStart

Fires when the object is being selected

The object at the beginning of the selection fires the event.

Info

  • access - protected


Documentation generated on Fri, 26 Dec 2008 11:44:20 +0100 by phpDocumentor 1.4.0a2