Panel
TsgcHTMLComponent_Panel — Delphi, C++ Builder 및 .NET에서 헤더, 본문 및 푸터를 갖춘, 선택적으로 접을 수 있고 스크롤 가능한 Bootstrap 카드 패널을 렌더링합니다.
TsgcHTMLComponent_Panel — Delphi, C++ Builder 및 .NET에서 헤더, 본문 및 푸터를 갖춘, 선택적으로 접을 수 있고 스크롤 가능한 Bootstrap 카드 패널을 렌더링합니다.
Bootstrap card 위에 구축된 박스형 콘텐츠 패널입니다. 제목과 본문을 설정하고, 색상을 선택하고, 접기 또는 스크롤을 토글한 다음, HTML 속성을 읽습니다.
TsgcHTMLComponent_Panel
Bootstrap 5 card 마크업
Delphi, C++ Builder, .NET
Title, Body 및 Footer를 할당하고, Color를 선택한 다음, HTML을 읽습니다 — 또는 정적 한 줄 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");
가장 자주 사용하게 되는 멤버.
Title은 카드 헤더를, Body는 주요 HTML 콘텐츠를, Footer는 선택적 푸터 행을 설정합니다.
Color(TsgcHTMLColor)는 테마 색상을 선택합니다. Outline은 채워진 배경 대신 테두리가 있는 변형을 렌더링합니다.
Collapsible은 헤더를 토글로 만들고, Expanded는 본문이 열린 상태로 시작할지를 설정합니다.
MaxHeight가 있는 Scrollable은 본문 높이의 상한을 정하고 긴 콘텐츠에 세로 스크롤을 추가합니다.
PanelID는 카드에 명시적 DOM id를 할당하며, 접기 대상의 앵커로 사용됩니다.
Build(aTitle, aBody, aColor, aFooter)는 단일 정적 호출로 패널 HTML을 반환합니다. HTML은 구성된 인스턴스를 렌더링합니다.