Panel
TsgcHTMLComponent_Panel — render a Bootstrap card panel with header, body and footer, optionally collapsible and scrollable, in Delphi, C++ Builder and .NET.
TsgcHTMLComponent_Panel — render a Bootstrap card panel with header, body and footer, optionally collapsible and scrollable, in Delphi, C++ Builder and .NET.
A boxed content panel built on the Bootstrap card. Set the title and body, pick a color, toggle collapsible or scrollable, then read the HTML property.
TsgcHTMLComponent_Panel
Bootstrap 5 card markup
Delphi, C++ Builder, .NET
Assign Title, Body and Footer, choose a Color, then read HTML — or use the static one-line Build helper.
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");
The members you reach for most often.
Title sets the card header, Body the main HTML content and Footer an optional footer row.
Color (TsgcHTMLColor) picks the theme color; Outline renders a bordered variant instead of a filled background.
Collapsible turns the header into a toggle, and Expanded sets whether the body starts open.
Scrollable with MaxHeight caps the body height and adds vertical scrolling for long content.
PanelID assigns the card an explicit DOM id, used as the anchor for the collapse target.
Build(aTitle, aBody, aColor, aFooter) returns the panel HTML in a single static call; HTML renders a configured instance.