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.

Component class

TsgcHTMLComponent_Timeline

Renders

Bootstrap 5 cards + scoped timeline CSS

Family

Data & Tables

Languages

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

Key properties & methods

The members you reach for most often.

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.

Keep exploring

All sgcHTML ComponentsBrowse the full feature matrix of 60+ components.
Download Free TrialThe 30-day trial ships the 60.HTML demo projects.
PricingSingle, Team and Site licenses with full source code.

Ready to Get Started?

Download the free trial and start building web UIs in Delphi, C++ Builder and .NET.