Creating a Metropolis UI ComboBox
To add a Metropolis UI style TComboBox to a FireMonkey Metro application:
- Create a Metropolis UI Style application using any of the Metropolis UI Style wizards for Delphi and C++Builder:
- Drop a TComboBox on the Metro form.
- In the Object Inspector, select or enter the value ddkNative for the property DropDownKind of TComboBox.
TComboBox works as a Metropolis UI control when you associate the combobox with any of the Metropolis UI styles. That is, when the DropDownKind property of a combobox is set to ddkNative, the positioning of the selector popup at run time is centered around the currently selected item, according to the Windows 8 style.
Every FireMonkey style file contains a TStyleDescription object, which contains the style description, including the platforms that can be used (TStyleDescription.PlatformTarget). For a Metropolis UI TComboBox, METROPOLISUI is one of the values in the PlatformTarget property of TStyleDescription.