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

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.

Bileşen sınıfı

TsgcHTMLComponent_InputGroup

İşler

Bootstrap 5 input-group işaretlemesi

Diller

Delphi, C++ Builder, .NET

Oluşturun, eklentiler ekleyin, işleyin

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");

Temel özellikler & yöntemler

En sık başvurduğunuz üyeler.

Eklentiler

PrependText, baştaki bir input-group-text eklentisi işler; AppendText, sondaki birini işler. Atlamak için ikisini de boş bırakın.

Girdi

InputName, InputValue ve Placeholder, iç form-control'ü doldurur; InputType, ham HTML tür dizesini ayarlar.

Girdi türü

InputTypeEnum (TsgcHTMLInputType), tür dizesini elle kodlamadan itText, itEmail, itNumber, itPassword, itTel ve daha fazlasını seçer.

Boyutlandırma

Size (TsgcHTMLInputGroupSize), Bootstrap input-group-sm/-lg değiştiricisini eklemek için igsDefault, igsSmall veya igsLarge seçer.

Statik yardımcı

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.

Çıktı

HTML, tam input-group <div>'ini döndürür; GroupID, betikleme veya biçimlendirme için onun id özniteliğini ayarlar.

Keşfetmeye devam edin

Tüm sgcHTML Bileşenleri60'tan fazla bileşenin tam özellik matrisine göz atın.
Ücretsiz Deneme Sürümünü İndirin30 günlük deneme, 60.HTML demo projeleriyle birlikte gelir.
FiyatlandırmaTam kaynak kodlu Single, Team ve Site lisansları.

Başlamaya Hazır mısınız?

Ücretsiz deneme sürümünü indirin ve Delphi, C++ Builder ya da .NET web uygulamanıza girdi grupları ekleyin.