TextBoxBase.AcceptsTab プロパティ
アセンブリ: System.Windows.Forms (system.windows.forms.dll 内)

Dim instance As TextBoxBase Dim value As Boolean value = instance.AcceptsTab instance.AcceptsTab = value
/** @property */ public boolean get_AcceptsTab () /** @property */ public void set_AcceptsTab (boolean value)
Tab キーを使用して複数行テキスト ボックスにタブを入力できる場合は true。Tab キーを押すとフォーカスが移動する場合は false。既定値は false です。

AcceptsTab プロパティが true に設定されている場合、ユーザーはタブ オーダーに従って次のコントロールにフォーカスを移動するためには Ctrl キーを押しながら Tab キーを押す必要があります。

派生クラス TextBox を使用して、垂直スクロール バーのある複数行 TextBox コントロールを作成するコード例を次に示します。この例では、AcceptsTab、AcceptsReturn、WordWrap の各プロパティも使用して、テキスト ドキュメントを作成しやすいように複数行テキスト ボックス コントロールを設定します。
Public Sub CreateMyMultilineTextBox() ' Create an instance of a TextBox control. Dim textBox1 As New TextBox() ' Set the Multiline property to true. textBox1.Multiline = True ' Add vertical scroll bars to the TextBox control. textBox1.ScrollBars = ScrollBars.Vertical ' Allow the RETURN key in the TextBox control. textBox1.AcceptsReturn = True ' Allow the TAB key to be entered in the TextBox control. textBox1.AcceptsTab = True ' Set WordWrap to true to allow text to wrap to the next line. textBox1.WordWrap = True ' Set the default text of the control. textBox1.Text = "Welcome!" & Environment.NewLine & "Second Line" End Sub
public void CreateMyMultilineTextBox() { // Create an instance of a TextBox control. TextBox textBox1 = new TextBox(); // Set the Multiline property to true. textBox1.Multiline = true; // Add vertical scroll bars to the TextBox control. textBox1.ScrollBars = ScrollBars.Vertical; // Allow the RETURN key in the TextBox control. textBox1.AcceptsReturn = true; // Allow the TAB key to be entered in the TextBox control. textBox1.AcceptsTab = true; // Set WordWrap to true to allow text to wrap to the next line. textBox1.WordWrap = true; // Set the default text of the control. textBox1.Text = "Welcome!" + Environment.NewLine + "Second Line"; }
public: void CreateMyMultilineTextBox() { // Create an instance of a TextBox control. TextBox^ textBox1 = gcnew TextBox; // Set the Multiline property to true. textBox1->Multiline = true; // Add vertical scroll bars to the TextBox control. textBox1->ScrollBars = ScrollBars::Vertical; // Allow the RETURN key in the TextBox control. textBox1->AcceptsReturn = true; // Allow the TAB key to be entered in the TextBox control. textBox1->AcceptsTab = true; // Set WordWrap to true to allow text to wrap to the next line. textBox1->WordWrap = true; // Set the default text of the control. textBox1->Text = "Welcome!" + Environment::NewLine + "Second Line"; }
public void CreateMyMultilineTextBox() { // Create an instance of a TextBox control. TextBox textBox1 = new TextBox(); // Set the Multiline property to true. textBox1.set_Multiline(true); // Add vertical scroll bars to the TextBox control. textBox1.set_ScrollBars(ScrollBars.Vertical); // Allow the RETURN key in the TextBox control. textBox1.set_AcceptsReturn(true); // Allow the TAB key to be entered in the TextBox control. textBox1.set_AcceptsTab(true); // Set WordWrap to true to allow text to wrap to the next line. textBox1.set_WordWrap(true); // Set the default text of the control. textBox1.set_Text("Welcome!" + Environment.get_NewLine() + "Second Line"); } //CreateMyMultilineTextBox

Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


Weblioに収録されているすべての辞書からTextBoxBase.AcceptsTab プロパティを検索する場合は、下記のリンクをクリックしてください。

- TextBoxBase.AcceptsTab プロパティのページへのリンク