Vcl.Themes.TStyleManager.TrySetStyle

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

class function TrySetStyle(const Name: string; ShowErrorDialog: Boolean = True): Boolean;

C++

__classmethod bool __fastcall TrySetStyle(const System::UnicodeString Name, bool ShowErrorDialog = true);

Properties

Type Visibility Source Unit Parent
function public
Vcl.Themes.pas
Vcl.Themes.hpp
Vcl.Themes TStyleManager

Description

Sets the style specified by name as the active style, without raising an exception.

TrySetStyle returns True if the style was successfully set as the active style, and False otherwise.

Parameter Meaning
Name A string that specifies the name of the style to be set as active.
ShowErrorDialog Specifies whether an error dialog box is shown if the style cannot be set as the active style.


See Also