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 — 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.
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.
TsgcHTMLComponent_Placeholder
Markup de placeholder do Bootstrap 5
Delphi, C++ Builder, .NET
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
Os membros que você usa com mais frequência.
LineCount define quantas linhas de texto placeholder são renderizadas (padrão 3) em larguras variadas para imitar texto real.
Animation seleciona o brilho paGlow ou paWave via TsgcHTMLPlaceholderAnimation.
ShowImage adiciona um bloco de imagem, ShowTitle uma barra de título e ShowButtons dois placeholders de botões.
Size define a altura do placeholder com phSmall, phNormal, phLarge ou phExtraLarge; Color recebe um TsgcHTMLColor.
BuildCard(lineCount, animation) retorna um card esqueleto completo; BuildText(lineCount, animation) apenas linhas de texto; BuildButton(animation) um único botão.
HTML retorna o card placeholder completo do Bootstrap — troque-o pelo conteúdo real assim que seus dados forem carregados.
| Todos os Componentes sgcHTMLExplore a matriz completa de recursos com mais de 60 componentes. | Abrir | |
| Baixar Versão de Avaliação GratuitaA avaliação de 30 dias inclui os projetos de demonstração 60.HTML. | Abrir | |
| PreçosLicenças Single, Team e Site com código-fonte completo. | Abrir |