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

Dim instance As RichTextBox Dim value As Boolean value = instance.AutoWordSelection instance.AutoWordSelection = value
/** @property */ public boolean get_AutoWordSelection () /** @property */ public void set_AutoWordSelection (boolean value)
public function get AutoWordSelection () : boolean public function set AutoWordSelection (value : boolean)
単語の自動選択が有効な場合は true。それ以外の場合は false。既定値は true です。


テキストが拡大表示され、コントロールのテキスト内の単語がダブルクリックされたときに単語が自動的に選択され、コントロールのクライアント領域の右側に余白がある RichTextBox を作成する方法を次のコード例に示します。RichTextBox コントロールの幅が小さい場合にこのコードを使用すると、テキストが見かけ上 1 行に 1 文字だけ表示される RichTextBox が作成されます。この垂直表示位置の場合、単語の任意の部分をクリックすると、テキストが縦書きで表示されていることにかかわらず、単語のすべての文字が選択されます。この例では、richTextBox1 という名前の RichTextBox コントロールがフォームに配置されている必要があります。
Private Sub ZoomMyRichTextBox() ' Enable users to select entire word when double clicked. richTextBox1.AutoWordSelection = True ' Clear contents of control. richTextBox1.Clear() ' Set the right margin to restrict horizontal text. richTextBox1.RightMargin = 2 ' Set the text for the control. richTextBox1.SelectedText = "Alpha Bravo Charlie Delta Echo Foxtrot" ' Zoom by 2 points. richTextBox1.ZoomFactor = 2.0F End Sub
private void ZoomMyRichTextBox() { // Enable users to select entire word when double clicked. richTextBox1.AutoWordSelection = true; // Clear contents of control. richTextBox1.Clear(); // Set the right margin to restrict horizontal text. richTextBox1.RightMargin = 2; // Set the text for the control. richTextBox1.SelectedText = "Alpha Bravo Charlie Delta Echo Foxtrot"; // Zoom by 2 points. richTextBox1.ZoomFactor = 2.0f; }
private: void ZoomMyRichTextBox() { // Enable users to select entire word when double clicked. richTextBox1->AutoWordSelection = true; // Clear contents of control. richTextBox1->Clear(); // Set the right margin to restrict horizontal text. richTextBox1->RightMargin = 2; // Set the text for the control. richTextBox1->SelectedText = "Alpha Bravo Charlie Delta Echo Foxtrot"; // Zoom by 2 points. richTextBox1->ZoomFactor = 2.0f; }
private void ZoomMyRichTextBox() { // Enable users to select entire word when double clicked. richTextBox1.set_AutoWordSelection(true); // Clear contents of control. richTextBox1.Clear(); // Set the right margin to restrict horizontal text. richTextBox1.set_RightMargin(2); // Set the text for the control. richTextBox1.set_SelectedText("Alpha Bravo Charlie Delta Echo Foxtrot"); // Zoom by 2 points. richTextBox1.set_ZoomFactor(2); } //ZoomMyRichTextBox

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に収録されているすべての辞書からRichTextBox.AutoWordSelection プロパティを検索する場合は、下記のリンクをクリックしてください。

- RichTextBox.AutoWordSelection プロパティのページへのリンク