SignaturePad Component — sgcHTML | eSeGeCe

SignaturePad

TsgcHTMLComponent_SignaturePad — render a pointer-events canvas signature pad with Clear, Undo and Save actions, in Delphi, C++ Builder and .NET.

TsgcHTMLComponent_SignaturePad

A canvas-based pad that captures a PNG signature client-side. Configure the pen and canvas, wire up ShowClear/ShowUndo/UploadURL, then read the HTML property.

Component class

TsgcHTMLComponent_SignaturePad

Renders

HTML5 <canvas> pad + PNG data URL

Languages

Delphi, C++ Builder, .NET

Create it, configure the pen, render it

Set FieldName, Width/Height and the pen colors, optionally set UploadURL to POST the signature, then read HTML.

uses
  sgcHTML_Component_SignaturePad;

var
  oPad: TsgcHTMLComponent_SignaturePad;
begin
  oPad := TsgcHTMLComponent_SignaturePad.Create(nil);
  try
    oPad.FieldName := 'signature';
    oPad.Width := 500;
    oPad.Height := 220;
    oPad.PenColor := '#1a1a2e';
    oPad.PenWidth := 3;
    oPad.UploadURL := '/api/signatures/upload';

    WebModule.Response := oPad.HTML;   // <canvas> + Clear/Undo/Save buttons
  finally
    oPad.Free;
  end;
end;
// includes: sgcHTML_Component_SignaturePad.hpp

TsgcHTMLComponent_SignaturePad *oPad = new TsgcHTMLComponent_SignaturePad(NULL);
try
{
  oPad->FieldName = "signature";
  oPad->Width = 500;
  oPad->Height = 220;
  oPad->PenColor = "#1a1a2e";
  oPad->PenWidth = 3;
  oPad->UploadURL = "/api/signatures/upload";

  String html = oPad->HTML;   // <canvas> + Clear/Undo/Save buttons
}
__finally
{
  delete oPad;
}
using esegece.sgcWebSockets;

var pad = new TsgcHTMLComponent_SignaturePad();
pad.FieldName = "signature";
pad.Width = 500;
pad.Height = 220;
pad.PenColor = "#1a1a2e";
pad.PenWidth = 3;
pad.UploadURL = "/api/signatures/upload";

string html = pad.HTML;   // <canvas> + Clear/Undo/Save buttons

Key properties & methods

The members you reach for most often.

Canvas

Width (default 400) and Height (default 200) size the <canvas>; PenColor (#1a1a2e) and PenWidth (2) style the stroke; BackgroundColor (#ffffff) fills the pad.

Posting the stroke

FieldName (default 'signature') renders a hidden input that the inline script refreshes with a PNG data URL after every stroke.

Actions

ShowClear and ShowUndo (both default True) add Clear/Undo buttons; ClearCaption and UndoCaption override their captions and fall back to the active locale.

Saving

UploadURL POSTs the PNG data URL client-side when Save is clicked; SaveCaption customizes that button's text.

Read-only display

ReadOnly renders a static <img> (or an empty placeholder box) instead of a live pad, showing SignatureDataURL when set.

WebSocket send

WSSend wraps the pad in a data-sgc-ws-send form so the signature is pushed to the server on submit, the same mechanism used by the Chat and Form components.

Keep exploring

Online HelpFull API reference and usage guide for this component.
All sgcHTML ComponentsBrowse the full feature matrix of 80+ 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.