Placeholder

TsgcHTMLComponent_Placeholder — renderiza una tarjeta de carga esqueleto de Bootstrap 5 con una animación shimmer y líneas, imagen, título y botones configurables, en Delphi, C++ Builder y .NET.

TsgcHTMLComponent_Placeholder

Un componente de cargador esqueleto que emite marcado placeholder de Bootstrap 5 con un shimmer glow o wave. Define el número de líneas y qué partes mostrar, y luego lee la propiedad HTML — o llama a los ayudantes estáticos BuildCard / BuildText.

Clase de componente

TsgcHTMLComponent_Placeholder

Renderiza

Marcado de placeholder de Bootstrap 5

Lenguajes

Delphi, C++ Builder, .NET

Créalo en una línea, o configúralo por completo

Llama a BuildCard(lineCount, animation) para una tarjeta esqueleto completa, o crea el componente, define LineCount, ShowImage y Animation, y luego lee 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

Propiedades y métodos clave

Los miembros que más vas a usar.

Líneas

LineCount define cuántas líneas de texto de placeholder se renderizan (por defecto 3) con anchos variados para imitar texto real.

Animación

Animation selecciona el shimmer paGlow o paWave mediante TsgcHTMLPlaceholderAnimation.

Secciones

ShowImage añade un bloque de imagen, ShowTitle una barra de título y ShowButtons dos placeholders de botón.

Apariencia

Size define la altura del placeholder con phSmall, phNormal, phLarge o phExtraLarge; Color toma un TsgcHTMLColor.

Ayudantes estáticos

BuildCard(lineCount, animation) devuelve una tarjeta esqueleto completa; BuildText(lineCount, animation) solo líneas de texto; BuildButton(animation) un único botón.

Salida

HTML devuelve la tarjeta de placeholder completa de Bootstrap — cámbiala por el contenido real una vez que tus datos hayan cargado.

Sigue explorando

Todos los componentes sgcHTMLExplora la matriz completa de más de 60 componentes.
Descargar prueba gratuitaLa prueba de 30 días incluye los proyectos demo 60.HTML.
PreciosLicencias Single, Team y Site con código fuente completo.

¿Listo para empezar?

Descarga la prueba gratuita y empieza a crear interfaces web en Delphi, C++ Builder y .NET.