FMX.Controls.TStyledControl.StyleLookup

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

property StyleLookup: string read FStyleLookup write SetStyleLookup;

C++

__property System::UnicodeString StyleLookup = {read=FStyleLookup, write=SetStyleLookup};

Properties

Type Visibility Source Unit Parent
property public
FMX.Controls.pas
FMX.Controls.hpp
FMX.Controls TStyledControl

Description

Specifies the name of the resource object to which the current TStyledControl is linked.

StyleLookup becomes especially useful with the introduction of Metropolis UI styles. Metropolis UI styles contain lots of styles for buttons, panes, lists, and other control elements. Each control has the default style, but you can change this default style to any style accessible for the class of a control. The StyleLookup property can be used to specify such additional style. In the Object Inspector, you can select in the StyleLookup property the name of an additional style for the control -- like searchbuttontext -- from the general style loaded into the TStyleBook or from the default style for the used platform. See StyleLookup Support for Metropolis UI Controls.


Note: At design time, using the StyleLookup property of a control in any form in the current project group you can access any custom style defined in any TStyleBook component used in the current project group. That is, even if the form does not have a particular TStyleBook component, controls from this form can use custom styles defined in this TStyleBook component (if this TStyleBook component is used in any form in the current project group). At run time, only styles in the current project and only after an owner of the TStyleBook containing these styles is already created can be accessed.

See Also

Sample