RichTextBox.BulletIndent プロパティとは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > RichTextBox.BulletIndent プロパティの意味・解説 

RichTextBox.BulletIndent プロパティ

箇条書きスタイルテキスト適用する場合に、RichTextBox コントロール内で使用するインデント幅を取得または設定します

名前空間: System.Windows.Forms
アセンブリ: System.Windows.Forms (system.windows.forms.dll 内)
構文構文

<LocalizableAttribute(True)> _
Public Property BulletIndent As
 Integer
Dim instance As RichTextBox
Dim value As Integer

value = instance.BulletIndent

instance.BulletIndent = value
[LocalizableAttribute(true)] 
public int BulletIndent { get;
 set; }
[LocalizableAttribute(true)] 
public:
property int BulletIndent {
    int get ();
    void set (int value);
}
/** @property */
public int get_BulletIndent ()

/** @property */
public void set_BulletIndent (int
 value)
public function get BulletIndent
 () : int

public function set BulletIndent
 (value : int)

プロパティ
行頭文字の後にインデント幅として挿入するピクセルの数。既定値は 0 です。

例外例外
例外種類条件

ArgumentException

指定したインデントが 0 未満でした。

解説解説
使用例使用例

BulletIndent、SelectionFont、SelectedText、および SelectionColor の各プロパティと共に SelectionBullet プロパティ使用してRichTextBox コントロール内に箇条書きリスト作成する方法次のコード例示します。この例では、richTextBox1 という名前の RichTextBox コントロールフォーム上で作成されている必要があります

Private Sub WriteTextToRichTextBox()
   ' Clear all text from the RichTextBox;
   richTextBox1.Clear()
   ' Indent bulleted text 30 pixels away from the bullet.
   richTextBox1.BulletIndent = 30
   ' Set the font for the opening text to a larger Arial font;
   richTextBox1.SelectionFont = New Font("Arial",
 16)
   ' Assign the introduction text to the RichTextBox control.
   RichTextBox1.SelectedText = "The following is a list of bulleted
 items:" + ControlChars.Cr
   ' Set the Font for the first item to a smaller size Arial font.
   richTextBox1.SelectionFont = New Font("Arial",
 12)
   ' Specify that the following items are to be added to a bulleted
 list.
   richTextBox1.SelectionBullet = True
   ' Set the color of the item text.
   richTextBox1.SelectionColor = Color.Red
   ' Assign the text to the bulleted item.
   richTextBox1.SelectedText = "Apples" + ControlChars.Cr
   ' Apply same font since font settings do not carry to next line.
   richTextBox1.SelectionFont = New Font("Arial",
 12)
   richTextBox1.SelectionColor = Color.Orange
   richTextBox1.SelectedText = "Oranges" + ControlChars.Cr
   richTextBox1.SelectionFont = New Font("Arial",
 12)
   richTextBox1.SelectionColor = Color.Purple
   richTextBox1.SelectedText = "Grapes" + ControlChars.Cr
   ' End the bulleted list.
   richTextBox1.SelectionBullet = False
   ' Specify the font size and string for text displayed below bulleted
 list.
   richTextBox1.SelectionFont = New Font("Verdana",
 10)
   richTextBox1.SelectedText = "The bulleted text is indented
 30 pixels from the bullet symbol using the BulletIndent property."
 + ControlChars.Cr
End Sub
private void WriteTextToRichTextBox()
{
   // Clear all text from the RichTextBox;
   richTextBox1.Clear();
   // Indent bulleted text 30 pixels away from the bullet.
   richTextBox1.BulletIndent = 30;
   // Set the font for the opening text to a larger Arial font;
   richTextBox1.SelectionFont = new Font("Arial", 16);
   // Assign the introduction text to the RichTextBox control.
   richTextBox1.SelectedText = "The following is a list of bulleted items:\n";
   // Set the Font for the first item to a smaller size Arial font.
   richTextBox1.SelectionFont = new Font("Arial", 12);
   // Specify that the following items are to be added to a bulleted
 list.
   richTextBox1.SelectionBullet = true;
   // Set the color of the item text.
   richTextBox1.SelectionColor = Color.Red;
   // Assign the text to the bulleted item.
   richTextBox1.SelectedText = "Apples" + "\n";
   // Apply same font since font settings do not carry to next line.
   richTextBox1.SelectionFont = new Font("Arial", 12);
   richTextBox1.SelectionColor = Color.Orange;
   richTextBox1.SelectedText = "Oranges" + "\n";
   richTextBox1.SelectionFont = new Font("Arial", 12);
   richTextBox1.SelectionColor = Color.Purple;
   richTextBox1.SelectedText = "Grapes" + "\n";
   // End the bulleted list.
   richTextBox1.SelectionBullet = false;
   // Specify the font size and string for text displayed below bulleted
 list.
   richTextBox1.SelectionFont = new Font("Verdana",
 10);
   richTextBox1.SelectedText = "The bulleted text is indented 30 pixels from
 the bullet symbol using the BulletIndent property.\n";
}
private:
   void WriteTextToRichTextBox()
   {
      // Clear all text from the RichTextBox;
      richTextBox1->Clear();

      // Indent bulleted text 30 pixels away from the bullet.
      richTextBox1->BulletIndent = 30;

      // Set the font for the opening text to a larger Arial font;
      richTextBox1->SelectionFont = gcnew System::Drawing::Font( "Arial",16
 );

      // Assign the introduction text to the RichTextBox control.
      richTextBox1->SelectedText = "The following is a list of bulleted items:\n";

      // Set the Font for the first item to a smaller size Arial font.
      richTextBox1->SelectionFont = gcnew System::Drawing::Font( "Arial",12
 );

      // Specify that the following items are to be added to a bulleted
 list.
      richTextBox1->SelectionBullet = true;

      // Set the color of the item text.
      richTextBox1->SelectionColor = Color::Red;

      // Assign the text to the bulleted item.
      richTextBox1->SelectedText = "Apples"
      "\n";

      // Apply same font since font settings do not carry to next line.
      richTextBox1->SelectionFont = gcnew System::Drawing::Font( "Arial",12
 );
      richTextBox1->SelectionColor = Color::Orange;
      richTextBox1->SelectedText = "Oranges"
      "\n";
      richTextBox1->SelectionFont = gcnew System::Drawing::Font( "Arial",12
 );
      richTextBox1->SelectionColor = Color::Purple;
      richTextBox1->SelectedText = "Grapes"
      "\n";

      // End the bulleted list.
      richTextBox1->SelectionBullet = false;

      // Specify the font size and string for text displayed below bulleted
 list.
      richTextBox1->SelectionFont = gcnew System::Drawing::Font( "Verdana",10
 );
      richTextBox1->SelectedText = "The bulleted text is indented 30 pixels
 from the bullet symbol using the BulletIndent property.\n";
   }
private void WriteTextToRichTextBox()
{
    // Clear all text from the RichTextBox;
    richTextBox1.Clear();
    // Indent bulleted text 30 pixels away from the bullet.
    richTextBox1.set_BulletIndent(30);
    // Set the font for the opening text to a larger Arial font;
    richTextBox1.set_SelectionFont(new Font("Arial",
 16));
    // Assign the introduction text to the RichTextBox control.
    richTextBox1.set_SelectedText("The following is a list of bulleted "
        + "items:\n");
    // Set the Font for the first item to a smaller size Arial font.
    richTextBox1.set_SelectionFont(new Font("Arial",
 12));
    // Specify that the following items are to be added to a bulleted
 list.
    richTextBox1.set_SelectionBullet(true);
    // Set the color of the item text.
    richTextBox1.set_SelectionColor(Color.get_Red());
    // Assign the text to the bulleted item.
    richTextBox1.set_SelectedText("Apples" + "\n");
    // Apply same font since font settings do not carry to next line.
    richTextBox1.set_SelectionFont(new Font("Arial",
 12));
    richTextBox1.set_SelectionColor(Color.get_Orange());
    richTextBox1.set_SelectedText("Oranges" + "\n");
    richTextBox1.set_SelectionFont(new Font("Arial",
 12));
    richTextBox1.set_SelectionColor(Color.get_Purple());
    richTextBox1.set_SelectedText("Grapes" + "\n");
    // End the bulleted list.
    richTextBox1.set_SelectionBullet(false);
    // Specify the font size and string for text displayed below bulleted
 list.
    richTextBox1.set_SelectionFont(new Font("Verdana",
 10));
    richTextBox1.set_SelectedText("The bulleted text is indented 30 pixels"
        + " from the bullet symbol using the BulletIndent
 property.\n");
} //WriteTextToRichTextBox
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照


このページでは「.NET Framework クラス ライブラリ リファレンス」からRichTextBox.BulletIndent プロパティを検索した結果を表示しています。
Weblioに収録されているすべての辞書からRichTextBox.BulletIndent プロパティを検索する場合は、下記のリンクをクリックしてください。
 全ての辞書からRichTextBox.BulletIndent プロパティ を検索

英和和英テキスト翻訳>> Weblio翻訳
英語⇒日本語日本語⇒英語
  

辞書ショートカット

すべての辞書の索引

「RichTextBox.BulletIndent プロパティ」の関連用語

RichTextBox.BulletIndent プロパティのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



RichTextBox.BulletIndent プロパティのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2025 Microsoft.All rights reserved.

©2025 GRAS Group, Inc.RSS