Placeholder

TsgcHTMLComponent_Placeholder — renderize um card de carregamento esqueleto do Bootstrap 5 com uma animação de brilho e linhas, imagem, título e botões configuráveis, em Delphi, C++ Builder e .NET.

TsgcHTMLComponent_Placeholder

Um componente carregador-esqueleto que emite markup placeholder do Bootstrap 5 com um brilho glow ou wave. Defina a contagem de linhas e quais partes mostrar e então leia a propriedade HTML — ou chame os helpers estáticos BuildCard / BuildText.

Classe do componente

TsgcHTMLComponent_Placeholder

Renderiza

Markup de placeholder do Bootstrap 5

Linguagens

Delphi, C++ Builder, .NET

Construa em uma linha, ou configure-o por completo

Chame BuildCard(lineCount, animation) para um card esqueleto completo, ou crie o componente, defina LineCount, ShowImage e Animation e então leia HTML.

uses
  sgcHTML_Enums, sgcHTML_Component_Placeholder;

// One-line static helper (primary form):
var
  vHTML: string;
begin
  vHTML := TsgcHTMLComponent_Placeholder.BuildCard(3, paWave);
  WebModule.Response := vHTML;
end;

// Or configure it fully:
var
  oPH: TsgcHTMLComponent_Placeholder;
begin
  oPH := TsgcHTMLComponent_Placeholder.Create(nil);
  try
    oPH.LineCount := 4;
    oPH.Animation := paGlow;
    oPH.Color := hcSecondary;
    oPH.ShowImage := True;
    oPH.ShowTitle := True;
    oPH.ShowButtons := True;

    WebModule.Response := oPH.HTML;   // Bootstrap placeholder card
  finally
    oPH.Free;
  end;
end;
// includes: sgcHTML_Enums.hpp, sgcHTML_Component_Placeholder.hpp

// One-line static helper (primary form):
String html = TsgcHTMLComponent_Placeholder::BuildCard(3, paWave);

// Or configure it fully:
TsgcHTMLComponent_Placeholder *oPH = new TsgcHTMLComponent_Placeholder(NULL);
try
{
  oPH->LineCount = 4;
  oPH->Animation = paGlow;
  oPH->Color = hcSecondary;
  oPH->ShowImage = true;
  oPH->ShowTitle = true;
  oPH->ShowButtons = true;

  String body = oPH->HTML;   // Bootstrap placeholder card
}
__finally
{
  delete oPH;
}
using esegece.sgcWebSockets;

// One-line static helper (primary form):
string html = TsgcHTMLComponent_Placeholder.BuildCard(3,
    TsgcHTMLPlaceholderAnimation.paWave);

// Or configure it fully:
var ph = new TsgcHTMLComponent_Placeholder();
ph.LineCount = 4;
ph.Animation = TsgcHTMLPlaceholderAnimation.paGlow;
ph.Color = TsgcHTMLColor.hcSecondary;
ph.ShowImage = true;
ph.ShowTitle = true;
ph.ShowButtons = true;

string body = ph.HTML;   // Bootstrap placeholder card

Principais propriedades & métodos

Os membros que você usa com mais frequência.

Linhas

LineCount define quantas linhas de texto placeholder são renderizadas (padrão 3) em larguras variadas para imitar texto real.

Animação

Animation seleciona o brilho paGlow ou paWave via TsgcHTMLPlaceholderAnimation.

Seções

ShowImage adiciona um bloco de imagem, ShowTitle uma barra de título e ShowButtons dois placeholders de botões.

Aparência

Size define a altura do placeholder com phSmall, phNormal, phLarge ou phExtraLarge; Color recebe um TsgcHTMLColor.

Helpers estáticos

BuildCard(lineCount, animation) retorna um card esqueleto completo; BuildText(lineCount, animation) apenas linhas de texto; BuildButton(animation) um único botão.

Saída

HTML retorna o card placeholder completo do Bootstrap — troque-o pelo conteúdo real assim que seus dados forem carregados.

Continue explorando

Todos os Componentes sgcHTMLExplore a matriz completa de recursos com mais de 60 componentes.
Baixar Versão de Avaliação GratuitaA avaliação de 30 dias inclui os projetos de demonstração 60.HTML.
PreçosLicenças Single, Team e Site com código-fonte completo.

Pronto para Começar?

Baixe a versão de avaliação gratuita e comece a construir UIs web em Delphi, C++ Builder e .NET.