Memo
TsgcHTMLComponent_Memo — Delphi、C++ Builder、.NET で、ラベル、設定可能な行数、データセットバインディングを備え、Bootstrap 5 の textarea をレンダリングする複数行テキストエリア入力欄です。
TsgcHTMLComponent_Memo — Delphi、C++ Builder、.NET で、ラベル、設定可能な行数、データセットバインディングを備え、Bootstrap 5 の textarea をレンダリングする複数行テキストエリア入力欄です。
ラベル付きの Bootstrap <textarea> を出力するスタンドアロンの複数行入力欄です。名前、ラベル、行数を設定してから、HTML プロパティを読み取ります。兄弟コンポーネントの Edit、CheckBox、RadioGroup の各入力と同じユニットに含まれています。
TsgcHTMLComponent_Memo
Bootstrap 5 の <textarea>
Delphi, C++ Builder, .NET
Name、Label_、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
最もよく使うメンバーです。
Name はフィールド名を、Label_ は表示用のキャプションを、MemoID は要素 id(既定値は memo_<Name>)を設定します。
Value は textarea の内容の初期値を設定し、Placeholder は空のときにゴーストテキストを表示します。
Rows は表示行数(既定値 4)を設定し、textarea の初期の高さを制御します。
Required、Disabled、ReadOnly は、検証と編集のために入力欄にフラグを立てます。
DataField と割り当てた DataSource によって、現在のレコードから Value を埋めます。
HTML はラベル付きの <textarea> を返します。同じユニットには、兄弟コンポーネントの TsgcHTMLComponent_Edit、TsgcHTMLComponent_CheckBox、TsgcHTMLComponent_RadioGroup の各入力が宣言されています。