Panel
TsgcHTMLComponent_Panel — renderizza un pannello card Bootstrap con intestazione, corpo e piè di pagina, facoltativamente comprimibile e scorrevole, in Delphi, C++ Builder e .NET.
TsgcHTMLComponent_Panel — renderizza un pannello card Bootstrap con intestazione, corpo e piè di pagina, facoltativamente comprimibile e scorrevole, in Delphi, C++ Builder e .NET.
Un pannello di contenuto riquadrato costruito sulla card Bootstrap. Imposta il titolo e il corpo, scegli un colore, attiva comprimibile o scorrevole, quindi leggi la proprietà HTML.
TsgcHTMLComponent_Panel
Bootstrap 5 card markup
Delphi, C++ Builder, .NET
Assegna Title, Body e Footer, scegli un Color, quindi leggi HTML — oppure usa l’helper statico Build a riga singola.
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");
I membri che utilizzerai più spesso.
Title imposta l’intestazione della card, Body il contenuto HTML principale e Footer una riga opzionale per il piè di pagina.
Color (TsgcHTMLColor) sceglie il colore del tema; Outline renderizza una variante bordata anziché uno sfondo pieno.
Collapsible trasforma l’intestazione in un toggle, ed Expanded imposta se il corpo inizia aperto.
Scrollable con MaxHeight limita l’altezza del corpo e aggiunge lo scorrimento verticale per i contenuti lunghi.
PanelID assegna alla card un id DOM esplicito, usato come ancora per il target di collasso.
Build(aTitle, aBody, aColor, aFooter) restituisce l’HTML del pannello con una singola chiamata statica; HTML renderizza un’istanza configurata.