FMX.Edit.TCustomEdit.ControlType

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

property ControlType: TControlType read FControlType write SetControlType default 0;

C++

__property ControlType = {default=0};

Properties

Type Visibility Source Unit Parent
property public
FMX.Edit.pas
FMX.Edit.hpp
FMX.Edit TCustomEdit

Description

Specifies the presentation type of the control.

FMX.Edit.TCustomEdit.ControlType inherits from FMX.Controls.Presentation.TPresentedControl.ControlType. All content below this line refers to FMX.Controls.Presentation.TPresentedControl.ControlType.

Specifies the presentation type of the control.

The values of ControlType are:

  • Styled represents the standard FireMonkey styling. This is the default value.
  • Platform represents the native styling of the target platform.

Supported Platforms

Currently, only iOS and Windows support native controls. The value of ControlType property on any other platform does not have any effect.

Available FireMonkey Native Controls

For a complete list of native controls, see Available FireMonkey Native Controls.

Advantages and Limitations

There are some advantages and limitations that you need to consider when using native controls. For example, there are some event handlers that are not supported on native controls. See Limitations of Native Controls for more details. On the other hand, the native presentation of TEdit and TMemo supports additional functionality, such as auto-completion and spell-checking on iOS and additional context-menu options on Windows. See Advantages of the Native Controls for more details.

Combining Native Controls With Non-native Controls

There are several non-native controls that have the ControlType property. If you set the ControlType property of non-native controls to Platform, you may still apply FireMonkey styling to them. The ControlType property of non-native controls allows you to combine them with native controls. See FireMonkey Native Controls - Combining Native Controls With Non-native Controls for more details.

Example

The following code snippets shows how to change the value of the ControlType property of a TCalendar component at run-time:

Delphi:

Calendar1 : TCalendar;
Calendar1.ControlType := TControlType.Platform;

C++:

TCalendar *Calendar1;
Calendar1->ControlType = TControlType::Platform;

Alternatively, you may change the value of the ControlType property in the Object Inspector Properties.

See Also