DashboardLayout
TsgcHTMLDashboardLayout — 固定サイドバーとタイトル付きのコンテンツセクションを備えた完全なダッシュボードシェルを Delphi、C++ Builder、.NET でレンダリングします。
TsgcHTMLDashboardLayout — 固定サイドバーとタイトル付きのコンテンツセクションを備えた完全なダッシュボードシェルを Delphi、C++ Builder、.NET でレンダリングします。
完全なダッシュボードシェルを出力するレイアウトコンポーネントです。左側に固定サイドバー、タイトル付きセクションから構築されたパディング付きのメイン領域を備えます。Sidebar を設定し、セクションを追加したら、HTML プロパティを読み取ります。
TsgcHTMLDashboardLayout
ダッシュボードシェル(固定サイドバー + コンテンツ)
Delphi, C++ Builder, .NET
読み取り専用の Sidebar を設定し、ブロックごとに AddSection(title, content) を呼び出したら、HTML を読み取ります(または TsgcHTMLTemplate_Bootstrap のページに組み込みます)。
uses
sgcHTML_Enums, sgcHTML_Component_DashboardLayout;
var
oDash: TsgcHTMLDashboardLayout;
begin
oDash := TsgcHTMLDashboardLayout.Create(nil);
try
oDash.DarkMode := True;
oDash.FooterText := '© 2026 Acme Inc.';
oDash.Sidebar.Brand := 'Acme Admin';
oDash.Sidebar.Items.Add.Text := 'Overview';
oDash.Sidebar.Items.Add.Text := 'Reports';
oDash.AddSection('Sales', '<p>Revenue is up 12%</p>');
oDash.AddSection('Activity', '<p>3 new orders</p>');
WebModule.Response := oDash.HTML; // dashboard shell
finally
oDash.Free;
end;
end;
// includes: sgcHTML_Enums.hpp, sgcHTML_Component_DashboardLayout.hpp
TsgcHTMLDashboardLayout *oDash = new TsgcHTMLDashboardLayout(NULL);
try
{
oDash->DarkMode = true;
oDash->FooterText = "© 2026 Acme Inc.";
oDash->Sidebar->Brand = "Acme Admin";
oDash->Sidebar->Items->Add()->Text = "Overview";
oDash->Sidebar->Items->Add()->Text = "Reports";
oDash->AddSection("Sales", "<p>Revenue is up 12%</p>");
oDash->AddSection("Activity", "<p>3 new orders</p>");
String html = oDash->HTML; // dashboard shell
}
__finally
{
delete oDash;
}
using esegece.sgcWebSockets;
var dash = new TsgcHTMLDashboardLayout();
dash.DarkMode = true;
dash.FooterText = "© 2026 Acme Inc.";
dash.Sidebar.Brand = "Acme Admin";
dash.Sidebar.Items.Add().Text = "Overview";
dash.Sidebar.Items.Add().Text = "Reports";
dash.AddSection("Sales", "<p>Revenue is up 12%</p>");
dash.AddSection("Activity", "<p>3 new orders</p>");
string html = dash.HTML; // dashboard shell
最もよく使うメンバー。
Sidebar は、左側に固定でレンダリングされる読み取り専用の TsgcHTMLComponent_Sidebar です。その Brand、Width、Items をその場で設定します。
AddSection(aTitle, aContent, aID) はタイトル付きの <section> を追加します。AddRawContent(aContent) はマークアップをそのまま挿入し、ClearContent はメイン領域を空にします。
Fluid は全幅コンテナを切り替え、FooterText は中央寄せのフッターを追加し、LayoutID はラッパーの要素 id を設定します。
DarkMode は、シェル内のカード、テーブル、フォーム、ナビ、リストグループを再配色するダークテーマのスタイルシートを注入します。
MainPadding、MainMinHeight、SectionMarginBottom がメイン領域のサイズを設定します。SectionTitleBorderColorStyle(TsgcHTMLColor)が各セクションのタイトル下線を色付けします。
HTML は完全なシェル — 固定サイドバー、メインコンテンツ、フッター — を返します。そのまま配信できる状態か、ページテンプレートの BodyContent に割り当てます。