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

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

RichTextBox.SelectionBullet プロパティ

現在選択されている内容またはカーソル位置箇条書きスタイル適用するかどうかを示す値を取得または設定します

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

Dim instance As RichTextBox
Dim value As Boolean

value = instance.SelectionBullet

instance.SelectionBullet = value
public bool SelectionBullet { get;
 set; }
public:
property bool SelectionBullet {
    bool get ();
    void set (bool value);
}
/** @property */
public boolean get_SelectionBullet ()

/** @property */
public void set_SelectionBullet (boolean value)
public function get SelectionBullet
 () : boolean

public function set SelectionBullet
 (value : boolean)

プロパティ
現在選択されている内容またはカーソル位置箇条書きスタイル適用されている場合trueそれ以外場合false

解説解説
使用例使用例

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

Private Sub WriteTextToRichTextBox()
   ' Clear all text from the RichTextBox;
   richTextBox1.Clear()
   ' 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("Arial",
 16)
   richTextBox1.SelectedText = "Bulleted Text Complete!"
End Sub
private void WriteTextToRichTextBox()
{
   // Clear all text from the RichTextBox;
   richTextBox1.Clear();
   // 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("Arial", 16);
   richTextBox1.SelectedText = "Bulleted Text Complete!";
}
private:
   void WriteTextToRichTextBox()
   {
      // Clear all text from the RichTextBox;
      richTextBox1->Clear();

      // 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( "Arial",16
 );
      richTextBox1->SelectedText = "Bulleted Text Complete!";
   }
private void WriteTextToRichTextBox()
{
    // Clear all text from the RichTextBox;
    richTextBox1.Clear();
    // 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("Arial",
 16));
    richTextBox1.set_SelectedText("Bulleted Text Complete!");
} //WriteTextToRichTextBox
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照


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

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

辞書ショートカット

すべての辞書の索引

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

   

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



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

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

©2025 GRAS Group, Inc.RSS