Class TIWBSCustomControl

DescriptionHierarchyFieldsMethodsProperties

Unit

Declaration

type TIWBSCustomControl = class(TIWCustomControl, IIWBSComponent)

Description

Base class for IWBS controls

Hierarchy

  • TIWCustomControl
  • TIWBSCustomControl

Overview

Methods

Public constructor Create(AOwner: TComponent); override;
Public destructor Destroy; override;
Public function IsStoredCustomAsyncEvents: Boolean;
Public function IsStoredCustomRestEvents: Boolean;
Public function JQSelector: string;
Public procedure AsyncRefreshControl;
Public procedure AsyncRemoveControl;

Properties

Published property CustomAsyncEvents: TIWBSCustomAsyncEvents read GetCustomAsyncEvents write SetCustomAsyncEvents stored IsStoredCustomAsyncEvents;
Published property CustomRestEvents: TIWBSCustomRestEvents read GetCustomRestEvents write SetCustomRestEvents stored IsStoredCustomRestEvents;
Published property Enabled;
Published property ExtraTagParams;
Published property FriendlyName;
Published property OnAsyncChange;
Published property OnAsyncClick;
Published property OnAsyncDoubleClick;
Published property OnAsyncEnter;
Published property OnAsyncExit;
Published property OnAsyncKeyDown;
Published property OnAsyncKeyPress;
Published property OnAsyncKeyUp;
Published property OnAsyncMouseDown;
Published property OnAsyncMouseMove;
Published property OnAsyncMouseOut;
Published property OnAsyncMouseOver;
Published property OnAsyncMouseUp;
Published property OnHTMLtag;
Published property OnRenderAsync: TNotifyEvent read FOnRenderAsync write FOnRenderAsync;
Published property Script: TStringList read GetScript write SetScript;
Published property ScriptEvents;
Published property ScriptInsideTag: boolean read GetScriptInsideTag write SetScriptInsideTag default True;
Published property ScriptParams: TIWBSScriptParams read GetScriptParams write SetScriptParams;
Published property Style: TStringList read GetStyle write SetStyle;
Published property TabIndex: integer read FTabIndex write FTabIndex default 0;

Description

Methods

Public constructor Create(AOwner: TComponent); override;
 
Public destructor Destroy; override;
 
Public function IsStoredCustomAsyncEvents: Boolean;
 
Public function IsStoredCustomRestEvents: Boolean;
 
Public function JQSelector: string;

returns a string representing the the JQSelector for this object.

IWBSCustomControl.JQSelector > '$(#"htmlname")'

Public procedure AsyncRefreshControl;

Force a full refresh of the control during an Async call.
Usually there is no need to use this method, only if some property changed during async calls is not reflected.

Public procedure AsyncRemoveControl;

Remove a control from html flow. You should execute this when destroying a control durinc async calls before Freeing
If you are destroying a region is enought to execute this in that region, you don't need to execute it in each child control.

Properties

Published property CustomAsyncEvents: TIWBSCustomAsyncEvents read GetCustomAsyncEvents write SetCustomAsyncEvents stored IsStoredCustomAsyncEvents;

Mainteins a list of TIWBSCustomAsyncEvent.
CustomAsyncEvent let you bind delphi code execution to practically any jQuery event of the control.
This is usefull when you apply third party plugins to the control.

Published property CustomRestEvents: TIWBSCustomRestEvents read GetCustomRestEvents write SetCustomRestEvents stored IsStoredCustomRestEvents;

Mainteins a list of TIWBSCustomRestEvent.
CustomRestEvent are for providing data to third party controls that request data via REST calls.

Published property Enabled;

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

Published property ExtraTagParams;
 
Published property FriendlyName;
 
Published property OnAsyncChange;
 
Published property OnAsyncClick;
 
Published property OnAsyncDoubleClick;
 
Published property OnAsyncEnter;
 
Published property OnAsyncExit;
 
Published property OnAsyncKeyDown;
 
Published property OnAsyncKeyPress;
 
Published property OnAsyncKeyUp;
 
Published property OnAsyncMouseDown;
 
Published property OnAsyncMouseMove;
 
Published property OnAsyncMouseOut;
 
Published property OnAsyncMouseOver;
 
Published property OnAsyncMouseUp;
 
Published property OnHTMLtag;

Occurs after HTMLTag is created

Published property OnRenderAsync: TNotifyEvent read FOnRenderAsync write FOnRenderAsync;

Occurs after component is updated during async calls

Published property Script: TStringList read GetScript write SetScript;

Specifies user javascript code that will be rendered and executed with this object.
You can define ScriptParams inside the script. ScriptParams are specified in scripts as: {%param%}.
With property ScriptInsideTag you can define if the script will be rendered inside or outside the script.

Published property ScriptEvents;

Maintains a list of JS events you can directly write events in JS
at design time you can access to a limited set of events, but at runtime you can attach to any event of the control doing:



(IWBSCustomControl.ScriptEvents.Values['object.custom.event'] := 'your javascript code...'; or if you want to define the function params:



(IWBSCustomControl.ScriptEvents.Values['object.custom.event'] := 'function (param1, param2, param3) { your javascript code... }';

Published property ScriptInsideTag: boolean read GetScriptInsideTag write SetScriptInsideTag default True;

Specifies if the script will be rendered inside the control tag or not.
If true (default) the script will be rendered inside the tag.
If false a new div will be created to surround the control and the script will be rendered in this div, outside the control tag.
this sometimes is necessary when plugins will change the content of the control tag.

Published property ScriptParams: TIWBSScriptParams read GetScriptParams write SetScriptParams;

Params that will be replaced in scripts and in some controls content, for example in TIWBSText.
Params are specified in scripts as: {%param%}.

Published property Style: TStringList read GetStyle write SetStyle;

List of inline styles in pairs name: value

Published property TabIndex: integer read FTabIndex write FTabIndex default 0;

Corresponds to html tabindex attribute. It will be rendered if tabindex <> 0. Set to -1 to disable tabstop


Generated by PasDoc 0.14.0.