Placeholder
TsgcHTMLComponent_Placeholder — Delphi, C++ Builder ve .NET'te parıltı animasyonu ve yapılandırılabilir satırlar, görsel, başlık ve düğmelerle bir Bootstrap 5 iskelet yükleme kartı işleyin.
TsgcHTMLComponent_Placeholder — Delphi, C++ Builder ve .NET'te parıltı animasyonu ve yapılandırılabilir satırlar, görsel, başlık ve düğmelerle bir Bootstrap 5 iskelet yükleme kartı işleyin.
Bir glow veya wave parıltısıyla Bootstrap 5 placeholder işaretlemesi üreten bir iskelet yükleyici bileşeni. Satır sayısını ve hangi parçaların gösterileceğini ayarlayın, ardından HTML özelliğini okuyun — ya da statik BuildCard / BuildText yardımcılarını çağırın.
TsgcHTMLComponent_Placeholder
Bootstrap 5 placeholder işaretlemesi
Delphi, C++ Builder, .NET
Tam bir iskelet kart için BuildCard(lineCount, animation)'i çağırın ya da bileşeni oluşturun, LineCount, ShowImage ve Animation'ı ayarlayın, ardından HTML'i okuyun.
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
En sık başvurduğunuz üyeler.
LineCount, gerçek metni taklit etmek için kaç placeholder metin satırının çeşitli genişliklerde işleneceğini ayarlar (varsayılan 3).
Animation, TsgcHTMLPlaceholderAnimation aracılığıyla paGlow veya paWave parıltısını seçer.
ShowImage, bir görsel bloğu, ShowTitle, bir başlık çubuğu ve ShowButtons, iki düğme yer tutucusu ekler.
Size, placeholder yüksekliğini phSmall, phNormal, phLarge veya phExtraLarge ile ayarlar; Color, bir TsgcHTMLColor alır.
BuildCard(lineCount, animation), tam bir iskelet kart döndürür; BuildText(lineCount, animation), yalnızca metin satırları; BuildButton(animation), tek bir düğme.
HTML, eksiksiz Bootstrap placeholder kartını döndürür — verileriniz yüklendiğinde onu gerçek içerikle değiştirin.