Placeholder
TsgcHTMLComponent_Placeholder — Delphi, C++ Builder 및 .NET에서 반짝임 애니메이션과 구성 가능한 줄, 이미지, 제목 및 버튼을 갖춘 Bootstrap 5 스켈레톤 로딩 카드를 렌더링합니다.
TsgcHTMLComponent_Placeholder — Delphi, C++ Builder 및 .NET에서 반짝임 애니메이션과 구성 가능한 줄, 이미지, 제목 및 버튼을 갖춘 Bootstrap 5 스켈레톤 로딩 카드를 렌더링합니다.
글로우 또는 웨이브 반짝임이 있는 Bootstrap 5 placeholder 마크업을 내보내는 스켈레톤 로더 컴포넌트입니다. 줄 수와 표시할 부분을 설정한 다음, HTML 속성을 읽습니다 — 또는 정적 BuildCard / BuildText 헬퍼를 호출하십시오.
TsgcHTMLComponent_Placeholder
Bootstrap 5 placeholder 마크업
Delphi, C++ Builder, .NET
전체 스켈레톤 카드를 위해 BuildCard(lineCount, animation)을 호출하거나, 컴포넌트를 생성하고 LineCount, ShowImage 및 Animation을 설정한 다음, HTML을 읽습니다.
uses
sgcHTML_Enums, sgcHTML_Component_Placeholder;
// One-line static helper (primary form):
var
vHTML: string;
begin
vHTML := TsgcHTMLComponent_Placeholder.BuildCard(3, paWave);
WebModule.Response := vHTML;
end;
// Or configure it fully:
var
oPH: TsgcHTMLComponent_Placeholder;
begin
oPH := TsgcHTMLComponent_Placeholder.Create(nil);
try
oPH.LineCount := 4;
oPH.Animation := paGlow;
oPH.Color := hcSecondary;
oPH.ShowImage := True;
oPH.ShowTitle := True;
oPH.ShowButtons := True;
WebModule.Response := oPH.HTML; // Bootstrap placeholder card
finally
oPH.Free;
end;
end;
// includes: sgcHTML_Enums.hpp, sgcHTML_Component_Placeholder.hpp
// One-line static helper (primary form):
String html = TsgcHTMLComponent_Placeholder::BuildCard(3, paWave);
// Or configure it fully:
TsgcHTMLComponent_Placeholder *oPH = new TsgcHTMLComponent_Placeholder(NULL);
try
{
oPH->LineCount = 4;
oPH->Animation = paGlow;
oPH->Color = hcSecondary;
oPH->ShowImage = true;
oPH->ShowTitle = true;
oPH->ShowButtons = true;
String body = oPH->HTML; // Bootstrap placeholder card
}
__finally
{
delete oPH;
}
using esegece.sgcWebSockets;
// One-line static helper (primary form):
string html = TsgcHTMLComponent_Placeholder.BuildCard(3,
TsgcHTMLPlaceholderAnimation.paWave);
// Or configure it fully:
var ph = new TsgcHTMLComponent_Placeholder();
ph.LineCount = 4;
ph.Animation = TsgcHTMLPlaceholderAnimation.paGlow;
ph.Color = TsgcHTMLColor.hcSecondary;
ph.ShowImage = true;
ph.ShowTitle = true;
ph.ShowButtons = true;
string body = ph.HTML; // Bootstrap placeholder card
가장 자주 사용하게 되는 멤버.
LineCount는 실제 텍스트를 모방하기 위해 다양한 너비로 렌더링되는 플레이스홀더 텍스트 줄 수를 설정합니다(기본값 3).
Animation은 TsgcHTMLPlaceholderAnimation을 통해 paGlow 또는 paWave 반짝임을 선택합니다.
ShowImage는 이미지 블록을, ShowTitle은 제목 막대를, ShowButtons는 두 개의 버튼 플레이스홀더를 추가합니다.
Size는 phSmall, phNormal, phLarge 또는 phExtraLarge로 플레이스홀더 높이를 설정합니다. Color는 TsgcHTMLColor를 받습니다.
BuildCard(lineCount, animation)은 전체 스켈레톤 카드를 반환하고, BuildText(lineCount, animation)은 텍스트 줄만, BuildButton(animation)은 단일 버튼을 반환합니다.
HTML은 완전한 Bootstrap 플레이스홀더 카드를 반환합니다 — 데이터가 로드되면 실제 콘텐츠로 교체하십시오.