FMX.Pickers.TPickerFactoryService.CreateListPicker

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

function CreateListPicker: TCustomListPicker;

C++

TCustomListPicker* __fastcall CreateListPicker();

Properties

Type Visibility Source Unit Parent
function public
FMX.Pickers.pas
FMX.Pickers.hpp
FMX.Pickers TPickerFactoryService

Description

Creates and initializes the platform-specific control element for the selection of a string item from a drop-down list control containing a string list.

CreateListPicker implements the CreateListPicker method declared in the IFMXPickerService interface.

CreateListPicker creates a new List picker and adds it into the list of pickers created in the IFMXPickerService platform service.

CreateListPicker calls the virtual abstract DoCreateListPicker method, which in turn is implemented in the platform-specific units like FMX.Pickers.Default or FMX.Pickers.iOS. This trick provides the platform-specific engine for the List picker. As a result, the List picker can give a native view and native behavior under different platforms for a control supporting the selection of a string item from a drop-down list control containing a string list. For example, the TComboBox control under Windows 8 can center the drop-down string list on the selected element:

Centered List for date selection

See Also