NumPad
TsgcHTMLComponent_NumPad — a touch numeric and currency keypad built for point-of-sale entry, with quick amount buttons and a hidden field that always posts a locale-independent number, in Delphi, C++ Builder and .NET.
TsgcHTMLComponent_NumPad — a touch numeric and currency keypad built for point-of-sale entry, with quick amount buttons and a hidden field that always posts a locale-independent number, in Delphi, C++ Builder and .NET.
Set Mode and DecimalPlaces, then read the HTML property; the pad posts a number like 12.50 under FieldName, never a locale-formatted 12,50.
TsgcHTMLComponent_NumPad
Calculator-style keypad + display + inline script
Delphi, C++ Builder, .NET
Every number this component writes, into the markup and into its own script, goes through a locale-independent formatter, never through a routine that honours the browser's regional settings.
uses
sgcHTML_Component_NumPad;
var
oPad: TsgcHTMLComponent_NumPad;
begin
oPad := TsgcHTMLComponent_NumPad.Create(nil);
try
oPad.PadID := 'till_amount';
oPad.FieldName := 'amount';
oPad.Mode := npCurrency;
oPad.CurrencySymbol := '$';
oPad.DecimalPlaces := 2;
oPad.QuickAmounts.CommaText := '5,10,20,50'; // tender shortcut buttons
WebModule.Response := oPad.HTML; // display + calculator-style keys + quick amounts
finally
oPad.Free;
end;
end;
// includes: sgcHTML_Component_NumPad.hpp
TsgcHTMLComponent_NumPad *oPad = new TsgcHTMLComponent_NumPad(NULL);
try
{
oPad->PadID = "till_amount";
oPad->FieldName = "amount";
oPad->Mode = npCurrency;
oPad->CurrencySymbol = "$";
oPad->DecimalPlaces = 2;
oPad->QuickAmounts->CommaText = "5,10,20,50";
String html = oPad->HTML; // display + calculator-style keys + quick amounts
}
__finally
{
delete oPad;
}
using esegece.sgcWebSockets;
var pad = new TsgcHTMLComponent_NumPad();
pad.PadID = "till_amount";
pad.FieldName = "amount";
pad.Mode = npCurrency;
pad.CurrencySymbol = "$";
pad.DecimalPlaces = 2;
pad.QuickAmounts.CommaText = "5,10,20,50";
string html = pad.HTML; // display + calculator-style keys + quick amounts
The members you reach for most often.
npInteger (no decimal key at all), npDecimal (default) or npCurrency, prefixed by CurrencySymbol.
Default 2, clamped 0–6. Every value the pad shows or posts is padded/rounded to this many decimals.
A TStrings of tender shortcut numbers; each entry is parsed and re-emitted through the same locale-independent formatter, so a malformed entry is dropped rather than reaching the page.
Hidden field the normalized value posts under, default amount.
0 (default) means no ceiling; above 0, a keystroke that would exceed it is rejected.
Enter becomes a real submit button when either is set, pushing over the sgcHTMX WebSocket bridge or POSTing to Action; a sgc:numpad DOM event always fires.
| 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 |