Barcode
TsgcHTMLComponent_Barcode — render a pure-Pascal Code 128 SVG barcode from any ASCII text, with optional human-readable caption, in Delphi, C++ Builder and .NET.
TsgcHTMLComponent_Barcode — render a pure-Pascal Code 128 SVG barcode from any ASCII text, with optional human-readable caption, in Delphi, C++ Builder and .NET.
Set Data (and optionally Symbology), then read the HTML property.
TsgcHTMLComponent_Barcode
Inline SVG Code 128 barcode + optional text (pure-Pascal encoder)
Delphi, C++ Builder, .NET
Set Data, pick ModuleWidth/Height, then read HTML.
uses
sgcHTML_Component_Barcode;
var
oBarcode: TsgcHTMLComponent_Barcode;
begin
oBarcode := TsgcHTMLComponent_Barcode.Create(nil);
try
oBarcode.Data := 'ACME-00219841';
oBarcode.Symbology := bsCode128;
oBarcode.ModuleWidth := 2;
oBarcode.Height := 60;
oBarcode.ShowText := True;
WebModule.Response := oBarcode.HTML; // SVG bars + human-readable text
finally
oBarcode.Free;
end;
end;
// includes: sgcHTML_Component_Barcode.hpp
TsgcHTMLComponent_Barcode *oBarcode = new TsgcHTMLComponent_Barcode(NULL);
try
{
oBarcode->Data = "ACME-00219841";
oBarcode->Symbology = bsCode128;
oBarcode->ModuleWidth = 2;
oBarcode->Height = 60;
oBarcode->ShowText = true;
String html = oBarcode->HTML; // SVG bars + human-readable text
}
__finally
{
delete oBarcode;
}
using esegece.sgcWebSockets;
var barcode = new TsgcHTMLComponent_Barcode();
barcode.Data = "ACME-00219841";
barcode.Symbology = TsgcHTMLBarcodeSymbology.bsCode128;
barcode.ModuleWidth = 2;
barcode.Height = 60;
barcode.ShowText = true;
string html = barcode.HTML; // SVG bars + human-readable text
The members you reach for most often.
Data is the value to encode; only ASCII 0–127 is accepted (an out-of-range character raises an exception).
Symbology selects the barcode standard; Code 128 (bsCode128) ships today, auto-switching between subsets A/B/C for the most compact encoding.
ModuleWidth sets the pixel width of the narrowest bar; Height sets the bar height.
ShowText prints the encoded Data under the bars.
Color paints the bars and text; BackgroundColor fills behind them.
GetSVG (also used by HTML) returns the inline SVG markup, wrapped in a sgc-barcode container.
| Online HelpFull API reference and usage guide for this component. | Open | |
| All sgcHTML ComponentsBrowse the full feature matrix of 80+ components. | Open | |
| Download Free TrialThe 30-day trial ships the 60.HTML demo projects. | Open | |
| PricingSingle, Team and Site licenses with full source code. | Open |