Panel

TsgcHTMLComponent_Panel — renderize um painel de card Bootstrap com cabeçalho, corpo e rodapé, opcionalmente recolhível e rolável, em Delphi, C++ Builder e .NET.

TsgcHTMLComponent_Panel

Um painel de conteúdo em caixa construído sobre o card do Bootstrap. Defina o título e o corpo, escolha uma cor, alterne recolhível ou rolável e então leia a propriedade HTML.

Classe do componente

TsgcHTMLComponent_Panel

Renderiza

Markup card do Bootstrap 5

Linguagens

Delphi, C++ Builder, .NET

Crie, defina o conteúdo, renderize

Atribua Title, Body e Footer, escolha uma Color e então leia HTML — ou use o helper estático de uma linha Build.

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");

Principais propriedades & métodos

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

Conteúdo

Title define o cabeçalho do card, Body o conteúdo HTML principal e Footer uma linha de rodapé opcional.

Aparência

Color (TsgcHTMLColor) escolhe a cor do tema; Outline renderiza uma variante com borda em vez de um fundo preenchido.

Colapso

Collapsible transforma o cabeçalho em uma alternância, e Expanded define se o corpo começa aberto.

Rolagem

Scrollable com MaxHeight limita a altura do corpo e adiciona rolagem vertical para conteúdo longo.

Identidade

PanelID atribui ao card um id explícito no DOM, usado como âncora para o alvo de colapso.

Construção em uma linha

Build(aTitle, aBody, aColor, aFooter) retorna o HTML do painel em uma única chamada estática; HTML renderiza uma instância configurada.

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.