Skip to main content
Table of Contents

TTMSFNCToolBar.Appearance Property

Appearance settings controlling fill, stroke, and style for each interaction state.

API unit family: TMSFNCToolBar Declaring type: TTMSFNCToolBar Inherited from: TTMSFNCCustomToolBar Type: TTMSFNCToolBarAppearance

Syntax

FMX.TMSFNCToolBar.hppPascalC++
property Appearance: TTMSFNCToolBarAppearance;
__property TTMSFNCToolBarAppearance* Appearance = {read=FAppearance, write=SetAppearance};

Usage examples

Style the toolbar surface and its buttons

Sets the toolbar fill, border, and spacing, and a rounded flat per-state button appearance.

Style the toolbar surface and its buttonsPascalC++
procedure TForm1.StyleToolBar;
var
  Button: TTMSFNCToolBarButton;
begin
  // Toolbar surface: solid light fill, no outer border, comfortable spacing.
  TMSFNCToolBar1.Appearance.Fill.Kind := gfkSolid;
  TMSFNCToolBar1.Appearance.Fill.Color := gcWhitesmoke;
  TMSFNCToolBar1.Appearance.Stroke.Kind := gskNone;
  TMSFNCToolBar1.Appearance.HorizontalSpacing := 6;

  Button := TMSFNCToolBar1.AddButton(-1, -1, '', '', 'Bold');

  // Per-state button appearance: rounded corners, flat until hovered or pressed.
  Button.Appearance.Rounding := 6;
  Button.Appearance.FlatStyle := True;
  Button.Appearance.HoverFill.Kind := gfkSolid;
  Button.Appearance.HoverFill.Color := gcGainsboro;
  Button.Appearance.DownFill.Kind := gfkSolid;
  Button.Appearance.DownFill.Color := gcSilver;

  TMSFNCToolBar1.Build;
end;
void __fastcall TForm1::StyleToolBar()
{
  // Toolbar surface: solid light fill, no outer border, comfortable spacing.
  TMSFNCToolBar1->Appearance->Fill->Kind = gfkSolid;
  TMSFNCToolBar1->Appearance->Fill->Color = gcWhitesmoke;
  TMSFNCToolBar1->Appearance->Stroke->Kind = gskNone;
  TMSFNCToolBar1->Appearance->HorizontalSpacing = 6;

  TTMSFNCToolBarButton *Button = TMSFNCToolBar1->AddButton(-1, -1, "", "", "Bold");

  // Per-state button appearance: rounded corners, flat until hovered or pressed.
  Button->Appearance->Rounding = 6;
  Button->Appearance->FlatStyle = true;
  Button->Appearance->HoverFill->Kind = gfkSolid;
  Button->Appearance->HoverFill->Color = gcGainsboro;
  Button->Appearance->DownFill->Kind = gfkSolid;
  Button->Appearance->DownFill->Color = gcSilver;

  TMSFNCToolBar1->Build();
}

Read the related guide