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

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

Form.AutoScroll プロパティ

フォーム自動スクロール有効にするかどうかを示す値を取得または設定します

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

<LocalizableAttribute(True)> _
Public Overrides Property
 AutoScroll As Boolean
Dim instance As Form
Dim value As Boolean

value = instance.AutoScroll

instance.AutoScroll = value
[LocalizableAttribute(true)] 
public override bool AutoScroll { get;
 set; }
[LocalizableAttribute(true)] 
public:
virtual property bool AutoScroll {
    bool get () override;
    void set (bool value)
 override;
}
/** @property */
public boolean get_AutoScroll ()

/** @property */
public void set_AutoScroll (boolean value)

プロパティ
フォーム自動スクロール有効にする場合trueそれ以外場合false既定値false です。

解説解説
使用例使用例

AutoScroll プロパティ使用してフォームクライアント領域より大きいコントロール表示有効にする方法次のコード例示します。この例では、新しフォーム作成し、そのフォームButton コントロール追加します。この Button コントロールサイズは、作成した新しフォームクライアント領域より大きくなっています。ユーザーコントロールスクロール行えるように、AutoScroll プロパティtrue設定してフォーム上にスクロール バー表示します。この例は、この例で定義されているメソッド別のフォームからイベント ハンドラか他のメソッド呼び出されることを前提にしています。

Private Sub DisplayMyScrollableForm()
   ' Create a new form.
   Dim form2 As New Form()
   ' Create a button to add to the new form.
   Dim button1 As New Button()
   ' Set text for the button.
   button1.Text = "Scrolled Button"
   ' Set the size of the button.
   button1.Size = New Size(100, 30)
   ' Set the location of the button to be outside the form's client
 area.
   button1.Location = New Point(form2.Size.Width + 200, form2.Size.Height
 + 200)

   ' Add the button control to the new form.
   form2.Controls.Add(button1)
   ' Set the AutoScroll property to true to provide scrollbars.
   form2.AutoScroll = True

   ' Display the new form as a dialog box.
   form2.ShowDialog()
End Sub
private void DisplayMyScrollableForm()
{
   // Create a new form.
   Form form2 = new Form();
   // Create a button to add to the new form.
   Button button1 = new Button();
   // Set text for the button.
   button1.Text = "Scrolled Button";
   // Set the size of the button.
   button1.Size = new Size(100,30);
   // Set the location of the button to be outside the form's client
 area.
   button1.Location = new Point(form2.Size.Width + 200, form2.Size.Height
 + 200);

   // Add the button control to the new form.
   form2.Controls.Add(button1);
   // Set the AutoScroll property to true to provide scrollbars.
   form2.AutoScroll = true;

   // Display the new form as a dialog box.
   form2.ShowDialog();
}
private:
   void DisplayMyScrollableForm()
   {
      // Create a new form.
      Form^ form2 = gcnew Form;

      // Create a button to add to the new form.
      Button^ button1 = gcnew Button;

      // Set text for the button.
      button1->Text = "Scrolled Button";

      // Set the size of the button.
      button1->Size = System::Drawing::Size( 100, 30 );

      // Set the location of the button to be outside the form's client
 area.
      button1->Location = Point(form2->Size.Width + 200,form2->Size.Height
 + 200);

      // Add the button control to the new form.
      form2->Controls->Add( button1 );

      // Set the AutoScroll property to true to provide scrollbars.
      form2->AutoScroll = true;

      // Display the new form as a dialog box.
      form2->ShowDialog();
   }
private void DisplayMyScrollableForm()
{
    // Create a new form.
    Form form2 = new Form();

    // Create a button to add to the new form.
    Button button1 = new Button();

    // Set text for the button.
    button1.set_Text("Scrolled Button");

    // Set the size of the button.
    button1.set_Size(new Size(100, 30));

    // Set the location of the button to be outside the form's client
 area.
    button1.set_Location(new Point(form2.get_Size().get_Width()
 + 200, 
        form2.get_Size().get_Height() + 200));

    // Add the button control to the new form.
    form2.get_Controls().Add(button1);

    // Set the AutoScroll property to true to provide scrollbars.
    form2.set_AutoScroll(true);

    // Display the new form as a dialog box.
    form2.ShowDialog();       
} //DisplayMyScrollableForm  
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照


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

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

辞書ショートカット

すべての辞書の索引

「Form.AutoScroll プロパティ」の関連用語

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

   

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



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

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

©2024 GRAS Group, Inc.RSS