InputGroup
TsgcHTMLComponent_InputGroup — Delphi, C++ Builder ve .NET'te ön ekleme ve son ekleme eklenti metniyle (örneğin $….00 veya @username) bir Bootstrap girdisi işleyin.
TsgcHTMLComponent_InputGroup — Delphi, C++ Builder ve .NET'te ön ekleme ve son ekleme eklenti metniyle (örneğin $….00 veya @username) bir Bootstrap girdisi işleyin.
Bir form-control çevresinde isteğe bağlı ön ekleme ve son ekleme eklenti metniyle bir Bootstrap input-group üreten bir girdi bileşeni. Metinleri ve girdiyi ayarlayın, ardından HTML özelliğini okuyun.
TsgcHTMLComponent_InputGroup
Bootstrap 5 input-group işaretlemesi
Delphi, C++ Builder, .NET
PrependText/AppendText ve girdi özelliklerini ayarlayın, ardından HTML'i okuyun — ya da tek satırlık çözüm için statik Build yardımcısını çağırın.
uses
sgcHTML_Enums, sgcHTML_Component_InputGroup;
var
oGroup: TsgcHTMLComponent_InputGroup;
begin
oGroup := TsgcHTMLComponent_InputGroup.Create(nil);
try
oGroup.PrependText := '$';
oGroup.AppendText := '.00';
oGroup.InputName := 'amount';
oGroup.InputTypeEnum := itNumber;
oGroup.Placeholder := '0';
oGroup.Size := igsLarge;
WebModule.Response := oGroup.HTML; // <div class="input-group">...
finally
oGroup.Free;
end;
end;
// Or the static one-liner (prepend, name, placeholder, append):
Result := TsgcHTMLComponent_InputGroup.Build('@', 'user', 'username');
// includes: sgcHTML_Enums.hpp, sgcHTML_Component_InputGroup.hpp
TsgcHTMLComponent_InputGroup *oGroup = new TsgcHTMLComponent_InputGroup(NULL);
try
{
oGroup->PrependText = "$";
oGroup->AppendText = ".00";
oGroup->InputName = "amount";
oGroup->InputTypeEnum = itNumber;
oGroup->Placeholder = "0";
oGroup->Size = igsLarge;
String html = oGroup->HTML; // <div class="input-group">...
}
__finally
{
delete oGroup;
}
// Or the static one-liner:
String html = TsgcHTMLComponent_InputGroup::Build("@", "user", "username");
using esegece.sgcWebSockets;
var group = new TsgcHTMLComponent_InputGroup();
group.PrependText = "$";
group.AppendText = ".00";
group.InputName = "amount";
group.InputTypeEnum = TsgcHTMLInputType.itNumber;
group.Placeholder = "0";
group.Size = TsgcHTMLInputGroupSize.igsLarge;
string html = group.HTML; // <div class="input-group">...
// Or the static one-liner:
string html2 = TsgcHTMLComponent_InputGroup.Build("@", "user", "username");
En sık başvurduğunuz üyeler.
PrependText, baştaki bir input-group-text eklentisi işler; AppendText, sondaki birini işler. Atlamak için ikisini de boş bırakın.
InputName, InputValue ve Placeholder, iç form-control'ü doldurur; InputType, ham HTML tür dizesini ayarlar.
InputTypeEnum (TsgcHTMLInputType), tür dizesini elle kodlamadan itText, itEmail, itNumber, itPassword, itTel ve daha fazlasını seçer.
Size (TsgcHTMLInputGroupSize), Bootstrap input-group-sm/-lg değiştiricisini eklemek için igsDefault, igsSmall veya igsLarge seçer.
Build(prepend, inputName, placeholder, append) — ve bir TsgcHTMLInputType alan bir aşırı yükleme — bir örnek yönetmeden işaretlemeyi tek satırda döndürür.
HTML, tam input-group <div>'ini döndürür; GroupID, betikleme veya biçimlendirme için onun id özniteliğini ayarlar.