Back to Devexpress

How to Use Skin Display Names in the Application

vcl-150043-expressskinslibrary-how-to-use-skin-display-names-in-the-application.md

latest1.9 KB
Original Source

How to Use Skin Display Names in the Application

  • Dec 06, 2024

To provide user-friendly names for skins in your application, do the following:

  • In the Skin Editor, click Project | Skin Details (or use the Alt+Enter shortcut) to open the Skin Details dialog.

  • In the dialog, enter the display text in the Display Name text field.

  • Save the skin.

Now, you can use the skin’s DisplayName property to return the entered string.

The following example demonstrates how to obtain a certain skin’s display name:

delphi
//...
uses
//...
    cxLookAndFeels, dxSkinInfo;
//...
var
  ASkinInfo: TdxSkinInfo;
begin
  //the painter's GetPainterData method returns True for skins, False -- for traditional styles
  if RootLookAndFeel.Painter.GetPainterData(ASkinInfo) then
    Caption := ASkinInfo.Skin.DisplayName;
end;

In this example, a combo box is populated with display names, using the dxSkinsUserSkinPopulateSkinNames function:

delphi
//...
begin
  // Set the last parameter to True to load display names
  dxSkinsUserSkinPopulateSkinNames('CustomSkins.skinres', cxComboBox1.Properties.Items, True);
end;

See Also

dxSkinsDefaultPainters.dxSkinsUserSkinPopulateSkinNames

How to Add Custom Colors and Properties to Skins

How to Add Custom Elements to Skins

How to Apply Custom Skins in the Application

Overview

Skin Editor UI