Skip to main content

How to Use Skin Display Names in the Application

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:

//...
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:

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