SignaturePad
TsgcHTMLComponent_SignaturePad — render a pointer-events canvas signature pad with Clear, Undo and Save actions, in Delphi, C++ Builder and .NET.
TsgcHTMLComponent_SignaturePad — render a pointer-events canvas signature pad with Clear, Undo and Save actions, in Delphi, C++ Builder and .NET.
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.
TsgcHTMLComponent_SignaturePad
HTML5 <canvas> pad + PNG data URL
Delphi, C++ Builder, .NET
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
The members you reach for most often.
Width (default 400) and Height (default 200) size the <canvas>; PenColor (#1a1a2e) and PenWidth (2) style the stroke; BackgroundColor (#ffffff) fills the pad.
FieldName (default 'signature') renders a hidden input that the inline script refreshes with a PNG data URL after every stroke.
ShowClear and ShowUndo (both default True) add Clear/Undo buttons; ClearCaption and UndoCaption override their captions and fall back to the active locale.
UploadURL POSTs the PNG data URL client-side when Save is clicked; SaveCaption customizes that button's text.
ReadOnly renders a static <img> (or an empty placeholder box) instead of a live pad, showing SignatureDataURL when set.
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.
| 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 |