Panel
TsgcHTMLComponent_Panel — render een Bootstrap-kaartpaneel met kop, body en voettekst, optioneel inklapbaar en scrollbaar, in Delphi, C++ Builder en .NET.
TsgcHTMLComponent_Panel — render een Bootstrap-kaartpaneel met kop, body en voettekst, optioneel inklapbaar en scrollbaar, in Delphi, C++ Builder en .NET.
Een omkaderd inhoudspaneel gebouwd op de Bootstrap-card. Stel de titel en body in, kies een kleur, schakel inklapbaar of scrollbaar in en lees dan de HTML-eigenschap.
TsgcHTMLComponent_Panel
Bootstrap 5 card-markup
Delphi, C++ Builder, .NET
Wijs Title, Body en Footer toe, kies een Color en lees dan HTML — of gebruik de statische 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");
De members die je het vaakst gebruikt.
Title stelt de kaartkop in, Body de belangrijkste HTML-inhoud en Footer een optionele voettekstrij.
Color (TsgcHTMLColor) kiest de themakleur; Outline rendert een omkaderde variant in plaats van een gevulde achtergrond.
Collapsible maakt van de kop een toggle, en Expanded bepaalt of de body open begint.
Scrollable met MaxHeight begrenst de bodyhoogte en voegt verticaal scrollen toe voor lange inhoud.
PanelID kent de kaart een expliciete DOM-id toe, gebruikt als anker voor het collapse-doel.
Build(aTitle, aBody, aColor, aFooter) retourneert de paneel-HTML in één statische aanroep; HTML rendert een geconfigureerde instantie.