Panel

TsgcHTMLComponent_Panel — genera un panel de tarjeta Bootstrap con cabecera, cuerpo y pie, opcionalmente plegable y desplazable, en Delphi, C++ Builder y .NET.

TsgcHTMLComponent_Panel

Un panel de contenido en caja construido sobre la card de Bootstrap. Asigna el título y el cuerpo, elige un color, activa el modo plegable o desplazable y luego lee la propiedad HTML.

Clase del componente

TsgcHTMLComponent_Panel

Genera

Marcado card de Bootstrap 5

Lenguajes

Delphi, C++ Builder, .NET

Créalo, define el contenido y genéralo

Asigna Title, Body y Footer, elige un Color y luego lee HTML — o usa el método auxiliar estático Build de una sola línea.

uses
  sgcHTML_Enums, sgcHTML_Component_Panel;

var
  oPanel: TsgcHTMLComponent_Panel;
begin
  oPanel := TsgcHTMLComponent_Panel.Create(nil);
  try
    oPanel.Title := 'Account Summary';
    oPanel.Body := '<p>Your plan renews on the 1st.</p>';
    oPanel.Footer := 'Last updated today';
    oPanel.Color := hcLight;
    oPanel.Collapsible := True;
    oPanel.Expanded := True;

    WebModule.Response := oPanel.HTML;   // Bootstrap card
  finally
    oPanel.Free;
  end;
end;

// Or in a single line with the static helper:
Result := TsgcHTMLComponent_Panel.Build('Account Summary',
  '<p>Your plan renews on the 1st.</p>', hcLight, 'Last updated today');
// includes: sgcHTML_Enums.hpp, sgcHTML_Component_Panel.hpp

TsgcHTMLComponent_Panel *oPanel = new TsgcHTMLComponent_Panel(NULL);
try
{
  oPanel->Title = "Account Summary";
  oPanel->Body = "<p>Your plan renews on the 1st.</p>";
  oPanel->Footer = "Last updated today";
  oPanel->Color = hcLight;
  oPanel->Collapsible = true;
  oPanel->Expanded = true;

  String html = oPanel->HTML;   // Bootstrap card
}
__finally
{
  delete oPanel;
}

// Or in a single line with the static helper:
String html = TsgcHTMLComponent_Panel::Build("Account Summary",
  "<p>Your plan renews on the 1st.</p>", hcLight, "Last updated today");
using esegece.sgcWebSockets;

var panel = new TsgcHTMLComponent_Panel();
panel.Title = "Account Summary";
panel.Body = "<p>Your plan renews on the 1st.</p>";
panel.Footer = "Last updated today";
panel.Color = TsgcHTMLColor.hcLight;
panel.Collapsible = true;
panel.Expanded = true;

string html = panel.HTML;   // Bootstrap card

// Or in a single line with the static helper:
string oneLine = TsgcHTMLComponent_Panel.Build("Account Summary",
    "<p>Your plan renews on the 1st.</p>", TsgcHTMLColor.hcLight, "Last updated today");

Propiedades y métodos clave

Los miembros que más utilizarás.

Contenido

Title define la cabecera de la tarjeta, Body el contenido HTML principal y Footer una fila de pie opcional.

Apariencia

Color (TsgcHTMLColor) elige el color del tema; Outline genera una variante con borde en lugar de un fondo relleno.

Plegado

Collapsible convierte la cabecera en un interruptor, y Expanded determina si el cuerpo empieza abierto.

Desplazamiento

Scrollable junto con MaxHeight limita la altura del cuerpo y añade desplazamiento vertical para contenido largo.

Identidad

PanelID asigna a la tarjeta un id de DOM explícito, usado como ancla del destino de plegado.

Construcción de una línea

Build(aTitle, aBody, aColor, aFooter) devuelve el HTML del panel en una única llamada estática; HTML genera una instancia configurada.

Sigue explorando

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

¿Listo para empezar?

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