Placeholder

TsgcHTMLComponent_Placeholder — Delphi, C++ Builder 및 .NET에서 반짝임 애니메이션과 구성 가능한 줄, 이미지, 제목 및 버튼을 갖춘 Bootstrap 5 스켈레톤 로딩 카드를 렌더링합니다.

TsgcHTMLComponent_Placeholder

글로우 또는 웨이브 반짝임이 있는 Bootstrap 5 placeholder 마크업을 내보내는 스켈레톤 로더 컴포넌트입니다. 줄 수와 표시할 부분을 설정한 다음, HTML 속성을 읽습니다 — 또는 정적 BuildCard / BuildText 헬퍼를 호출하십시오.

컴포넌트 클래스

TsgcHTMLComponent_Placeholder

렌더링

Bootstrap 5 placeholder 마크업

언어

Delphi, C++ Builder, .NET

한 줄로 구성하거나, 완전하게 구성하기

전체 스켈레톤 카드를 위해 BuildCard(lineCount, animation)을 호출하거나, 컴포넌트를 생성하고 LineCount, ShowImageAnimation을 설정한 다음, 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).

애니메이션

AnimationTsgcHTMLPlaceholderAnimation을 통해 paGlow 또는 paWave 반짝임을 선택합니다.

섹션

ShowImage는 이미지 블록을, ShowTitle은 제목 막대를, ShowButtons는 두 개의 버튼 플레이스홀더를 추가합니다.

외관

SizephSmall, phNormal, phLarge 또는 phExtraLarge로 플레이스홀더 높이를 설정합니다. ColorTsgcHTMLColor를 받습니다.

정적 헬퍼

BuildCard(lineCount, animation)은 전체 스켈레톤 카드를 반환하고, BuildText(lineCount, animation)은 텍스트 줄만, BuildButton(animation)은 단일 버튼을 반환합니다.

출력

HTML은 완전한 Bootstrap 플레이스홀더 카드를 반환합니다 — 데이터가 로드되면 실제 콘텐츠로 교체하십시오.

계속 살펴보기

모든 sgcHTML 컴포넌트60개 이상의 컴포넌트 전체 기능 매트릭스를 둘러보십시오.
무료 체험판 다운로드30일 체험판에는 60.HTML 데모 프로젝트가 포함됩니다.
가격전체 소스 코드가 포함된 Single, Team 및 Site 라이선스.

시작할 준비가 되셨습니까?

무료 체험판을 다운로드하고 Delphi, C++ Builder 및 .NET에서 웹 UI를 구축하기 시작하십시오.