Stepper

TsgcHTMLComponent_Stepper — Delphi、C++ Builder、.NET で、完了、現在、これからの状態を備えたウィザード / ステップ進捗インジケーターをレンダリングします。

TsgcHTMLComponent_Stepper

番号付きの円、コネクター、ステップごとの状態色を備えた Bootstrap 5 マークアップを出力するステップインジケーターです。ステップ項目を追加し、それぞれの State を設定してから、HTML プロパティを読み取ります。

コンポーネントクラス

TsgcHTMLComponent_Stepper

レンダリング内容

Bootstrap 5 のステップ / ウィザードマークアップ

言語

Delphi, C++ Builder, .NET

作成し、ステップを追加し、レンダリングする

ステップ項目を追加し、各 TitleDescriptionState を設定し、Layout を選択してから、HTML を読み取ります(または TsgcHTMLTemplate_Bootstrap ページに組み込みます)。

uses
  sgcHTML_Enums, sgcHTML_Component_Stepper;

var
  oStepper: TsgcHTMLComponent_Stepper;
  oStep: TsgcHTMLStepItem;
begin
  oStepper := TsgcHTMLComponent_Stepper.Create(nil);
  try
    oStepper.Layout := slHorizontal;
    oStepper.ShowContent := True;
    oStepper.CurrentColorStyle := hcPrimary;

    oStep := oStepper.Items.Add;
    oStep.Title := 'Account';
    oStep.Description := 'Sign in';
    oStep.State := ssCompleted;

    oStep := oStepper.Items.Add;
    oStep.Title := 'Shipping';
    oStep.Description := 'Address';
    oStep.State := ssCurrent;
    oStep.Content := '<p>Enter your delivery address</p>';

    oStep := oStepper.Items.Add;
    oStep.Title := 'Payment';
    oStep.State := ssUpcoming;

    WebModule.Response := oStepper.HTML;   // Bootstrap stepper
  finally
    oStepper.Free;
  end;
end;
// includes: sgcHTML_Enums.hpp, sgcHTML_Component_Stepper.hpp

TsgcHTMLComponent_Stepper *oStepper = new TsgcHTMLComponent_Stepper(NULL);
try
{
  oStepper->Layout = slHorizontal;
  oStepper->ShowContent = true;
  oStepper->CurrentColorStyle = hcPrimary;

  TsgcHTMLStepItem *oStep = oStepper->Items->Add();
  oStep->Title = "Account";
  oStep->Description = "Sign in";
  oStep->State = ssCompleted;

  oStep = oStepper->Items->Add();
  oStep->Title = "Shipping";
  oStep->Description = "Address";
  oStep->State = ssCurrent;
  oStep->Content = "<p>Enter your delivery address</p>";

  oStep = oStepper->Items->Add();
  oStep->Title = "Payment";
  oStep->State = ssUpcoming;

  String html = oStepper->HTML;   // Bootstrap stepper
}
__finally
{
  delete oStepper;
}
using esegece.sgcWebSockets;

var stepper = new TsgcHTMLComponent_Stepper();
stepper.Layout = TsgcHTMLStepperLayout.slHorizontal;
stepper.ShowContent = true;
stepper.CurrentColorStyle = TsgcHTMLColor.hcPrimary;

var step = stepper.Items.Add();
step.Title = "Account";
step.Description = "Sign in";
step.State = TsgcHTMLStepState.ssCompleted;

step = stepper.Items.Add();
step.Title = "Shipping";
step.Description = "Address";
step.State = TsgcHTMLStepState.ssCurrent;
step.Content = "<p>Enter your delivery address</p>";

step = stepper.Items.Add();
step.Title = "Payment";
step.State = TsgcHTMLStepState.ssUpcoming;

string html = stepper.HTML;   // Bootstrap stepper

主なプロパティとメソッド

最もよく使うメンバーです。

Steps

ItemsTsgcHTMLStepItems コレクションです。Items.Add は、TitleDescriptionContentStateIcon を持つ TsgcHTMLStepItem を返します。

State

各ステップの StatessUpcomingssCurrentssCompleted で、円の色、コネクターの塗りつぶし、(ShowContent を伴う)現在ステップのパネルを駆動します。

Layout

LayoutslHorizontal または slVertical を選択します。ShowContent は、レールの下にアクティブなステップの Content をレンダリングします。

State colors

CompletedColorStyleCurrentColorStyleUpcomingColorStyle(それぞれ TsgcHTMLColor)は円に色を付けます。*Color の文字列バリアントは生の 16 進数で上書きします。

Appearance

CircleSizeConnectorHeightCompletedIconStepFontSizeStepDescFontSize はサイズとグリフを調整します。

Output

HTML はステッパーのマークアップを返し、StepperID はその要素 id を設定します — そのまま配信するか、ページテンプレートの BodyContent に割り当てます。

さらに詳しく

すべての sgcHTML コンポーネント60 以上のコンポーネントの全機能マトリックスを閲覧できます。
無料体験版のダウンロード30 日間の体験版には 60.HTML デモプロジェクトが付属します。
価格完全なソースコード付きの Single、Team、Site ライセンス。

始める準備はできましたか?

無料体験版をダウンロードして、Delphi、C++ Builder、.NET で Web UI の構築を始めましょう。