Timeline

TsgcHTMLComponent_Timeline — render a vertical timeline of dated events as cards on a coloured line, in Delphi, C++ Builder and .NET.

TsgcHTMLComponent_Timeline

Add timeline items with a title, content and timestamp (or bind a dataset), tune the line and dots, then read the HTML property.

Klasa komponentu

TsgcHTMLComponent_Timeline

Renderuje

Bootstrap 5 cards + scoped timeline CSS

Rodzina

Dane i tabele

Języki

Delphi, C++ Builder, .NET

Add items, style the line, render it

Push a few Items.Add entries with a Title, Content and Timestamp, set the line and dot size, then read HTML.

uses
  sgcHTML_Component_Timeline;

var
  oTimeline: TsgcHTMLComponent_Timeline;
  oItem: TsgcHTMLTimelineItem;
begin
  oTimeline := TsgcHTMLComponent_Timeline.Create(nil);
  try
    oTimeline.LineWidth := 2;
    oTimeline.DotSize := 18;

    oItem := oTimeline.Items.Add;
    oItem.Timestamp := '09:30';
    oItem.Title := 'Order placed';
    oItem.Content := 'Payment confirmed.';
    oItem.Color := '#7C3AED';

    WebModule.Response := oTimeline.HTML;   // cards + scoped CSS
  finally
    oTimeline.Free;
  end;
end;

// Or bind it straight to a dataset:
oTimeline.LoadFromDataSet(qryLog, 'Event', 'Detail', 'LoggedAt');
// includes: sgcHTML_Component_Timeline.hpp

TsgcHTMLComponent_Timeline *oTimeline = new TsgcHTMLComponent_Timeline(NULL);
try
{
  oTimeline->LineWidth = 2;
  oTimeline->DotSize = 18;

  TsgcHTMLTimelineItem *oItem = oTimeline->Items->Add();
  oItem->Timestamp = "09:30";
  oItem->Title = "Order placed";
  oItem->Content = "Payment confirmed.";
  oItem->Color = "#7C3AED";

  String html = oTimeline->HTML;   // cards + scoped CSS
}
__finally
{
  delete oTimeline;
}
using esegece.sgcWebSockets;

var timeline = new TsgcHTMLComponent_Timeline();
timeline.LineWidth = 2;
timeline.DotSize = 18;

var item = timeline.Items.Add();
item.Timestamp = "09:30";
item.Title = "Order placed";
item.Content = "Payment confirmed.";
item.Color = "#7C3AED";

string html = timeline.HTML;   // cards + scoped CSS

Kluczowe właściwości i metody

Składniki, po które sięgasz najczęściej.

Items

Items holds entries with Title, Content, Timestamp, Icon, hex Color and enum ColorStyle; each renders as a dotted card.

Dataset binding

LoadFromDataSet(aDataSet, aTitleField, aContentField, aTimestampField) creates one item per row; content and timestamp fields are optional.

Line

LineColor (hex) or LineColorStyle (enum) plus LineWidth control the vertical connector.

Dots

DotSize sets the marker diameter; each item's Color or ColorStyle fills its dot.

Timestamps

TimeColor (hex) or TimeColorStyle (enum) style the small timestamp label on each card.

Output

TimelineID identifies the wrapper; HTML returns the cards together with the scoped timeline CSS.

Poznawaj dalej

Wszystkie komponenty sgcHTMLPrzejrzyj pełną matrycę funkcji 60+ komponentów.
Pobierz bezpłatną wersję próbną30-dniowa wersja próbna zawiera projekty demonstracyjne 60.HTML.
CennikLicencje Single, Team i Site z pełnym kodem źródłowym.

Gotowy, aby zacząć?

Pobierz bezpłatną wersję próbną i zacznij budować interfejsy webowe w Delphi, C++ Builder i .NET.