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

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

RichTextBox.ZoomFactor プロパティ

RichTextBox の現在のズーム レベルを取得または設定します。

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

<LocalizableAttribute(True)> _
Public Property ZoomFactor As
 Single
Dim instance As RichTextBox
Dim value As Single

value = instance.ZoomFactor

instance.ZoomFactor = value
[LocalizableAttribute(true)] 
public float ZoomFactor { get;
 set; }
[LocalizableAttribute(true)] 
public:
property float ZoomFactor {
    float get ();
    void set (float value);
}
/** @property */
public float get_ZoomFactor ()

/** @property */
public void set_ZoomFactor (float
 value)

プロパティ値
コントロールの内容をズームする倍率。

例外例外
例外の種類条件

ArgumentException

指定したズームの倍率が許容範囲外でした。

解説解説
使用例使用例

テキストが拡大表示され、コントロールのテキスト内の単語がダブルクリックされたときに単語が自動的に選択され、コントロールのクライアント領域の右側に余白がある 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
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照



英和和英テキスト翻訳

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

辞書ショートカット

すべての辞書の索引

RichTextBox.ZoomFactor プロパティのお隣キーワード

   

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



RichTextBox.ZoomFactor プロパティのページの著作権

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

©2026 GRAS Group, Inc.RSS