TW3MovableControl

From Smart Mobile Studio
Jump to: navigation, search


Unit: W3Components.pas


Hierarchy
TObject
TW3TagObj
TW3Component
TW3MovableControl
Properties
Property-icon.png Background
Property-icon.png Border
Property-icon.png Color
Property-icon.png Visible
Methods
Method-icon.png ControlAtPoint
Method-icon.png MoveTo


Properties

Property-icon.png Background

Specify background of component. This property is of TW3ControlBackground type and include own class members.

property Background: TW3ControlBackground read GetBackGround;

Examples:

W3Panel1.Background.FromColor(clRed);
W3Panel1.Background.FromColor($00ff3300);
W3Panel1.Background.FromURL('http://www.mysite.com/image.jpg');


Property-icon.png Border

Specify borders of component. This property is of TW3Borders type and include own class members.

property Border: TW3Borders read getBorder;

Examples:

W3Panel1.Border.Right.Width := 2;
W3Panel1.Border.Right.Style := besDotted;


Property-icon.png Color

Specify Background Color of component.

property Color: TColor read FColor write setColor;

This property set background-color CSS attribute of Component’s DOM object.


Code:

W3Panel1.Color := clRed;

HTML:

<div id="OBJ5" class="TW3Panel" style="visibility: visible; display: inline-block; position: absolute; overflow: hidden; left: 16px; top: 56px; width: 200px; height: 80px; background-color: rgb(255, 0, 0);"></div>
Note-icon.png Setting this property is same as using Background.FromColor method.


See also: TW3ControlBackground.FromColor


Property-icon.png Visible

Specifies whether the component appears onscreen.

property Visible: Boolean read getVisible write setVisible;

This property set display CSS attribute of Component’s DOM object.


Code:

W3Panel1.Visible := False;

Html:

<div id="OBJ5" class="TW3Panel" style="visibility: hidden; display: none; position: absolute; overflow: hidden; 
left: 16px; top: 56px;width: 200px; height: 80px;"></div>


Methods

Method-icon.png ControlAtPoint

Return TW3Component instance at specified (client) coordinates.

function ControlAtPoint(x, y: Integer; const Recursive: Boolean): TW3Component; overload;


Example:

MyComponent := ControlAtPoint(X, Y, True);
if MyComponent <> nil then
begin
  MyComponent.Width := 200;
end;


Method-icon.png MoveTo

Specifies Left and Top properties of control with one call.

procedure MoveTo(aLeft, aTop: Integer); virtual;