A single developer license allows 1 developer to use the components for development, obtain free updates & support for a full version cycle of the product. The license is not transferable.
A single developer license allows 1 developer to use the components for development, obtain free updates & support for 1 year. The license is not transferable.
A single developer license allows 1 developer to use the components for development, obtain free updates & support for 2 years. The license is not transferable.
A small team license allows 2 developers within the company to use the components for development, obtain free updates & support for a full version cycle of the product. The license is not transferable.
A small team license allows 2 developers within the company to use the components for development, obtain free updates & support for 1 year. The license is not transferable.
A small team license allows 2 developers within the company to use the components for development, obtain free updates & support for 2 years. The license is not transferable.
A site license allows an unlimited number of developers within the company to use the components for development, obtain free updates & support for a full version cycle of the product. Developers can be added at any time during the full version cycle.
A site license allows an unlimited number of developers within the company to use the components for development, obtain free updates & support for 1 year. Developers can be added at any time during the 1 year period.
A site license allows an unlimited number of developers within the company to use the components for development, obtain free updates & support for 2 years. Developers can be added at any time during the 2 year period.
TMS Pack for FireMonkey v2.0.2.1 works with Delphi XE2, XE3 and C++Builder XE2, XE3.
TMS Pack for FireMonkey v2.1.0.0 requires Delphi XE4 or C++Builder XE4.
Tips and Frequently Asked Questions
Performance [Important !]
To enchance performance of Windows projects in firemonkey,
you can try to set the GlobalUseDirect2D := false flag in order to gain more performance
program Project1;
uses
FMX.Forms, FMX.Types,
Unit1 in 'Unit1.pas' {Form1};
{$R *.res}
begin
GlobalUseDirect2D := False;
Application.Initialize;
Application.CreateForm(TForm1, Form1);
Application.Run;
end.
Pieter Scheldeman (Jul 6, 2012)
Adding an element at runtime to the TTMSFMXTableView
To add an element at runtime, the shape that is connected to the TTMSFMXTableViewItem must exist. The shape can be
returned using the Shape function on the TTMSFMXTableViewItem:
var
shp: TTMSFMXTableViewItemShape;
shp := TMSFMXTableView1.Items[0].Shape;
To add a element / control to that shape, simply create that element and add it as a child of the item.
r := TRectangle.Create(shp);
shp.AddObject(r);
Pieter Scheldeman (May 9, 2012)
Compiling / Distribution for iOS
When creating your project in Delphi, and afterwards, generate a xcode compatible project (dpr2xcode.exe) there are some additional steps to be taken before the project will compile in xcode.
In the generated iOS version you will notice an xcode folder, with an xcode project file. Before opening this
project file in xcode you need to copy the correct source files from the installation directory to the
directory of this your xcode project:
- All the FMX_*.pas files
- All the FMX_*.res files
- The tmsdefsios.inc file
The last step to take is to rename the tmsdefsios.inc file to tmsdefs.inc file in order to compile
correctly. After opening the project in xcode, click the run button, which will automatically compile
and run the project in the simulator. Of course you can select to run it on a real device as well.
Pieter Scheldeman (Apr 5, 2012)
My First FireMonkey Component
Below is a sample that is useful to understand the design of a new FireMonkey component.
These three code snippets will result in your first control which has a backgroundrectangle, a button, an edit, and an additional rectangle.
This component only loads the style file as a layout, and is static. You can click on the button and type in the edit field, but the component has no properties to interact with.
fmx.MyFirstControl.pas
unit fmx.MyFirstControl;
interface
uses
FMX.Types, Types, Classes;
TMyFirstControl = class(TStyledControl)
private
public
constructor Create(AOwner: TComponent); override;
protected
function GetClassName: String; virtual;
function GetClassStyleName: String; virtual;
function GetStyleObject: TControl; override;
function LoadFromResource: TControl;
end;
procedure Register;
implementation
{$R fmx.myfirstcontrol.res}
procedure Register;
begin
RegisterComponents(‘My First FireMonkey Control’, [TMyFirstControl]);
end;
function TMyFirstControl.GetClassName: String;
begin
Result := ClassName;
end;
constructor TMyFirstControl.Create(AOwner: TComponent); override;
begin
inherited;
Width := 209;
Height := 105;
end;
function TMyFirstControl.GetClassStyleName: String;
begin
Result := GetClassName + 'style';
Delete(Result, 1, 1);
end;
function TMyFirstControl.GetStyleObject: TControl;
var
obj: TControl;
begin
obj := inherited GetStyleObject;
if not Assigned(obj) then
begin
// not found in default or custom style book, so create from resource
obj := LoadFromResource;
end;
Result := obj;
end;
function TMyFirstControl.LoadFromResource: TControl;
var
S: TResourceStream;
str: String;
begin
Result := nil;
// create resource class name
str := GetClassStyleName;
if FindRCData(HInstance, str) then
begin
// load from RT_RCDATA resource type
S := TResourceStream.Create(HInstance, str, RT_RCDATA);
try
Result := TControl(CreateObjectFromStream(nil, S));
finally
S.Free;
end;
end;
end;
initialization
RegisterFmxClasses([TMyFirstControl]);
end.
Let’s say you want to rotate the rectangle through a property. Create a property that will control the RotationAngle of the rectangle. In the setter you can access the rectangle with his StyleName:
To increase the performance, and to make sure all properties functions methods are executed and set, encapsulate every runtime
update with a BeginUpdate and EndUpdate call.
var
i: integer;
begin
TMSFMXTableView1.BeginUpdate;
for i := 0 to 1000 do
begin
TMSFMXTableView1.Items.Add.Caption := 'item '+ inttostr(i);
end;
TMSFMXTableView1.EndUpdate;
end;
var
i: integer;
begin
TMSFMXGrid1.BeginUpdate;
TMSFMXGrid1.ColumnWidths[2] := 100;
TMSFMXGrid1.EndUpdate;
end;