Commonly Encountered Differences Between the VCL and FireMonkey
Go Up to GUI Application Frameworks
Although FireMonkey is designed to have some superficial similarity with the VCL, numerous small differences can trip up someone that is familiar with the VCL. This topic covers some of those differences.
In FireMonkey, check boxes should use the OnChange event instead of OnClick to react to the changes of the checked state. The property that reflects that state is IsChecked, not Checked as in the VCL.
In the VCL, objects parenting other components can be done only through TForms, TFrames, TPanels and Data Modules. In FireMonkey, you can parent any object to anything else, and this relationship can be easily established in the Structure View.
FireMonkey colors have an alpha (opacity) component in addition to RGB. Colors are represented by system types TAlphaColor and TAlphaColorRec. FireMonkey uses color constants from the System.UIConsts unit. These color constants are prefixed with "cla" instead of "cl". Also, see Colors in the VCL.
In FireMonkey, controls use a Position of type TPosition with nested X and Y properties. 3D controls' Position property is an instance of TPosition3D, with an additional Z coordinate. For size, FireMonkey uses Width and Height (and Depth for 3D controls).
Database Grid Events
In the VCL, font sizes are expressed in points, 72 per logical inch.
In FireMonkey, font sizes are expressed in device-independent pixels (DIPs), 96 per logical inch.
Therefore, text using the same Font.Size is smaller in FireMonkey.
Radio Buttons and Groups
- Note: In FireMonkey, items as radio buttons are not supported in TPanel.
The radio buttons in each VCL TGroupBox are independent. If you convert multiple VCL TGroupBox to FireMonkey TGroupBox, the containing radio buttons become dependant (selection in one group clear selection in other groups). To restore independence in FireMonkey, manually specify GroupName property for each converted TRadioButton.