Memo

TsgcHTMLComponent_Memo — Delphi、C++ Builder、.NET で、ラベル、設定可能な行数、データセットバインディングを備え、Bootstrap 5 の textarea をレンダリングする複数行テキストエリア入力欄です。

TsgcHTMLComponent_Memo

ラベル付きの Bootstrap <textarea> を出力するスタンドアロンの複数行入力欄です。名前、ラベル、行数を設定してから、HTML プロパティを読み取ります。兄弟コンポーネントの Edit、CheckBox、RadioGroup の各入力と同じユニットに含まれています。

コンポーネントクラス

TsgcHTMLComponent_Memo

レンダリング内容

Bootstrap 5 の <textarea>

ファミリー

フォーム & 入力

言語

Delphi, C++ Builder, .NET

作成し、設定し、レンダリングする

NameLabel_Rows、そして Placeholder を設定してから、HTML を読み取ります(または TsgcHTMLTemplate_Bootstrap ページに組み込みます)。

uses
  sgcHTML_Component_Edit;

var
  oMemo: TsgcHTMLComponent_Memo;
begin
  oMemo := TsgcHTMLComponent_Memo.Create(nil);
  try
    oMemo.Name := 'notes';
    oMemo.Label_ := 'Notes';
    oMemo.Rows := 6;
    oMemo.Placeholder := 'Anything we should know?';
    oMemo.Value := 'Initial text';

    WebModule.Response := oMemo.HTML;   // Bootstrap textarea
  finally
    oMemo.Free;
  end;
end;

// Or bind it to a dataset field:
oMemo.DataField := 'Notes';
oMemo.DataSource := dsCustomer;
// includes: sgcHTML_Component_Edit.hpp

TsgcHTMLComponent_Memo *oMemo = new TsgcHTMLComponent_Memo(NULL);
try
{
  oMemo->Name = "notes";
  oMemo->Label_ = "Notes";
  oMemo->Rows = 6;
  oMemo->Placeholder = "Anything we should know?";
  oMemo->Value = "Initial text";

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

var memo = new TsgcHTMLComponent_Memo();
memo.Name = "notes";
memo.Label_ = "Notes";
memo.Rows = 6;
memo.Placeholder = "Anything we should know?";
memo.Value = "Initial text";

string html = memo.HTML;   // Bootstrap textarea

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

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

Identity

Name はフィールド名を、Label_ は表示用のキャプションを、MemoID は要素 id(既定値は memo_<Name>)を設定します。

Value & hint

Value は textarea の内容の初期値を設定し、Placeholder は空のときにゴーストテキストを表示します。

Size

Rows は表示行数(既定値 4)を設定し、textarea の初期の高さを制御します。

State

RequiredDisabledReadOnly は、検証と編集のために入力欄にフラグを立てます。

Dataset binding

DataField と割り当てた DataSource によって、現在のレコードから Value を埋めます。

Output & siblings

HTML はラベル付きの <textarea> を返します。同じユニットには、兄弟コンポーネントの TsgcHTMLComponent_EditTsgcHTMLComponent_CheckBoxTsgcHTMLComponent_RadioGroup の各入力が宣言されています。

さらに詳しく

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

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

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