ScrollEventArgsとは? わかりやすく解説

ScrollEventArgs クラス

Scroll イベントデータ提供します

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

<ComVisibleAttribute(True)> _
Public Class ScrollEventArgs
    Inherits EventArgs
Dim instance As ScrollEventArgs
[ComVisibleAttribute(true)] 
public class ScrollEventArgs : EventArgs
[ComVisibleAttribute(true)] 
public ref class ScrollEventArgs : public
 EventArgs
/** @attribute ComVisibleAttribute(true) */ 
public class ScrollEventArgs extends EventArgs
ComVisibleAttribute(true) 
public class ScrollEventArgs extends
 EventArgs
解説解説
使用例使用例
Private Sub AddMyScrollEventHandlers()
    ' Create and initialize a VScrollBar.
    Dim vScrollBar1 As New
 VScrollBar()
    
    ' Add event handlers for the OnScroll and OnValueChanged events.
    AddHandler vScrollBar1.Scroll, AddressOf
 Me.vScrollBar1_Scroll
    AddHandler vScrollBar1.ValueChanged, AddressOf
 Me.vScrollBar1_ValueChanged
End Sub    

' Create the ValueChanged event handler.
Private Sub vScrollBar1_ValueChanged(sender
 As Object, e As EventArgs)
    ' Display the new value in the label.
    label1.Text = "vScrollBar Value:(OnValueChanged Event) "
 & _
        vScrollBar1.Value.ToString()
End Sub    

' Create the Scroll event handler.
Private Sub vScrollBar1_Scroll(sender As
 Object, e As ScrollEventArgs)
    ' Display the new value in the label.
    label1.Text = "VScrollBar Value:(OnScroll Event) "
 & _
        e.NewValue.ToString()
End Sub    

Private Sub button1_Click(sender As
 Object, e As EventArgs)
    ' Add 40 to the Value property if it will not exceed the Maximum
 value.
    If vScrollBar1.Value + 40 < vScrollBar1.Maximum Then
        vScrollBar1.Value = vScrollBar1.Value + 40
    End If
End Sub

private void AddMyScrollEventHandlers()
 {
    // Create and initialize a VScrollBar.
    VScrollBar vScrollBar1 = new VScrollBar();
 
    // Add event handlers for the OnScroll and OnValueChanged events.
    vScrollBar1.Scroll += new ScrollEventHandler(
       this.vScrollBar1_Scroll);
    vScrollBar1.ValueChanged += new EventHandler(
       this.vScrollBar1_ValueChanged); 
 }
 
 // Create the ValueChanged event handler.
 private void vScrollBar1_ValueChanged(Object
 sender, 
                                       EventArgs e)
 {
     // Display the new value in the label.
     label1.Text = "vScrollBar Value:(OnValueChanged Event) " + vScrollBar1.Value.ToString();
 }
 
 // Create the Scroll event handler.
 private void vScrollBar1_Scroll(Object sender,
 
                                 ScrollEventArgs e)
 {
     // Display the new value in the label.
     label1.Text = "VScrollBar Value:(OnScroll Event) " + e.NewValue.ToString();
 }
 
 private void button1_Click(Object sender,
 
                           EventArgs e)
 {
    // Add 40 to the Value property if it will not exceed the Maximum
 value.
    if (vScrollBar1.Value + 40 < vScrollBar1.Maximum)
    {
        vScrollBar1.Value = vScrollBar1.Value + 40;
    }
 }
 
void AddMyScrollEventHandlers()
{
   // Create and initialize a VScrollBar.
   VScrollBar^ vScrollBar1 = gcnew VScrollBar;

   // Add event handlers for the OnScroll and OnValueChanged events.
   vScrollBar1->Scroll += gcnew ScrollEventHandler( this, &Form1::vScrollBar1_Scroll
 );
   vScrollBar1->ValueChanged += gcnew EventHandler( this, &Form1::vScrollBar1_ValueChanged
 );
}

// Create the ValueChanged event handler.
void vScrollBar1_ValueChanged( Object^ /*sender*/, EventArgs^
 /*e*/ )
{
   // Display the new value in the label.
   label1->Text = String::Format( "vScrollBar Value:(OnValueChanged Event)
 {0}", vScrollBar1->Value );
}

// Create the Scroll event handler.
void vScrollBar1_Scroll( Object^ /*sender*/, ScrollEventArgs^
 e )
{
   // Display the new value in the label.
   label1->Text = String::Format( "VScrollBar Value:(OnScroll Event) {0}",
 e->NewValue );
}

void button1_Click( Object^ /*sender*/, EventArgs^ /*e*/ )
{
   // Add 40 to the Value property if it will not exceed the Maximum
 value.
   if ( vScrollBar1->Value + 40 < vScrollBar1->Maximum
 )
   {
      vScrollBar1->Value = vScrollBar1->Value + 40;
   }
}
private void AddMyScrollEventHandlers()
{
    // Create and initialize a VScrollBar.
    VScrollBar vScrollBar1 = new VScrollBar();

    // Add event handlers for the OnScroll and OnValueChanged events.
    vScrollBar1.add_Scroll(
        new ScrollEventHandler(this.vScrollBar1_Scroll));
    vScrollBar1.add_ValueChanged(
        new EventHandler(this.vScrollBar1_ValueChanged));
} //AddMyScrollEventHandlers

// Create the ValueChanged event handler.
private void vScrollBar1_ValueChanged(Object
 sender, EventArgs e)
{
    // Display the new value in the label.
    label1.set_Text("vScrollBar Value:(OnValueChanged Event) " 
        + vScrollBar1.get_Value());
} //vScrollBar1_ValueChanged

// Create the Scroll event handler.
private void vScrollBar1_Scroll(Object sender,
 ScrollEventArgs e)
{
    // Display the new value in the label.
    label1.set_Text(
        "VScrollBar Value:(OnScroll Event) " + e.get_NewValue());
} //vScrollBar1_Scroll

private void button1_Click(Object sender, EventArgs
 e)
{
    // Add 40 to the Value property if it will not exceed the Maximum
 
    // value.
    if (vScrollBar1.get_Value() + 40 < vScrollBar1.get_Maximum())
 {
        vScrollBar1.set_Value(vScrollBar1.get_Value() + 40);
    }
} //button1_Click
継承階層継承階層
System.Object
   System.EventArgs
    System.Windows.Forms.ScrollEventArgs
スレッド セーフスレッド セーフ
この型の public static (Visual Basic では Shared) メンバはすべて、スレッド セーフです。インスタンス メンバ場合は、スレッド セーフであるとは限りません。
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照

ScrollEventArgs コンストラクタ (ScrollEventType, Int32)

Type プロパティと NewValue プロパティ指定された値を使用して、ScrollEventArgs クラス新しインスタンス初期化します。

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

Public Sub New ( _
    type As ScrollEventType, _
    newValue As Integer _
)
Dim type As ScrollEventType
Dim newValue As Integer

Dim instance As New ScrollEventArgs(type,
 newValue)
public ScrollEventArgs (
    ScrollEventType type,
    int newValue
)
public:
ScrollEventArgs (
    ScrollEventType type, 
    int newValue
)
public ScrollEventArgs (
    ScrollEventType type, 
    int newValue
)
public function ScrollEventArgs (
    type : ScrollEventType, 
    newValue : int
)

パラメータ

type

ScrollEventType 値の 1 つ

newValue

スクロール バー新しい値。

プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
ScrollEventArgs クラス
ScrollEventArgs メンバ
System.Windows.Forms 名前空間
ScrollEventType

ScrollEventArgs コンストラクタ (ScrollEventType, Int32, Int32)

メモ : このコンストラクタは、.NET Framework version 2.0新しく追加されたものです。

Type、OldValue、および NewValue の各プロパティ指定された値を使用して、ScrollEventArgs クラス新しインスタンス初期化します。

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

Public Sub New ( _
    type As ScrollEventType, _
    oldValue As Integer, _
    newValue As Integer _
)
Dim type As ScrollEventType
Dim oldValue As Integer
Dim newValue As Integer

Dim instance As New ScrollEventArgs(type,
 oldValue, newValue)
public ScrollEventArgs (
    ScrollEventType type,
    int oldValue,
    int newValue
)
public:
ScrollEventArgs (
    ScrollEventType type, 
    int oldValue, 
    int newValue
)
public ScrollEventArgs (
    ScrollEventType type, 
    int oldValue, 
    int newValue
)
public function ScrollEventArgs (
    type : ScrollEventType, 
    oldValue : int, 
    newValue : int
)

パラメータ

type

ScrollEventType 値の 1 つ

oldValue

スクロール バーの古い値。

newValue

スクロール バー新しい値。

プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
ScrollEventArgs クラス
ScrollEventArgs メンバ
System.Windows.Forms 名前空間
ScrollEventType

ScrollEventArgs コンストラクタ

ScrollEventArgs クラス新しインスタンス初期化します。
オーバーロードの一覧オーバーロードの一覧

名前 説明
ScrollEventArgs (ScrollEventType, Int32) Type プロパティと NewValue プロパティ指定された値を使用してScrollEventArgs クラス新しインスタンス初期化します。
ScrollEventArgs (ScrollEventType, Int32, Int32) Type、OldValue、および NewValue の各プロパティ指定された値を使用してScrollEventArgs クラス新しインスタンス初期化します。
ScrollEventArgs (ScrollEventType, Int32, ScrollOrientation) TypeNewValue、および ScrollOrientation の各プロパティ指定された値を使用してScrollEventArgs クラス新しインスタンス初期化します。
ScrollEventArgs (ScrollEventType, Int32, Int32, ScrollOrientation) TypeOldValueNewValue、および ScrollOrientation の各プロパティ指定された値を使用してScrollEventArgs クラス新しインスタンス初期化します。
参照参照

関連項目

ScrollEventArgs クラス
ScrollEventArgs メンバ
System.Windows.Forms 名前空間
ScrollEventType

ScrollEventArgs コンストラクタ (ScrollEventType, Int32, Int32, ScrollOrientation)

メモ : このコンストラクタは、.NET Framework version 2.0新しく追加されたものです。

Type、OldValue、NewValue、および ScrollOrientation の各プロパティ指定された値を使用して、ScrollEventArgs クラス新しインスタンス初期化します。

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

Public Sub New ( _
    type As ScrollEventType, _
    oldValue As Integer, _
    newValue As Integer, _
    scroll As ScrollOrientation _
)
Dim type As ScrollEventType
Dim oldValue As Integer
Dim newValue As Integer
Dim scroll As ScrollOrientation

Dim instance As New ScrollEventArgs(type,
 oldValue, newValue, scroll)
public ScrollEventArgs (
    ScrollEventType type,
    int oldValue,
    int newValue,
    ScrollOrientation scroll
)
public:
ScrollEventArgs (
    ScrollEventType type, 
    int oldValue, 
    int newValue, 
    ScrollOrientation scroll
)
public ScrollEventArgs (
    ScrollEventType type, 
    int oldValue, 
    int newValue, 
    ScrollOrientation scroll
)
public function ScrollEventArgs (
    type : ScrollEventType, 
    oldValue : int, 
    newValue : int, 
    scroll : ScrollOrientation
)

パラメータ

type

ScrollEventType 値の 1 つ

oldValue

スクロール バーの古い値。

newValue

スクロール バー新しい値。

scroll

ScrollOrientation 値の 1 つ

プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
ScrollEventArgs クラス
ScrollEventArgs メンバ
System.Windows.Forms 名前空間
ScrollEventType

ScrollEventArgs コンストラクタ (ScrollEventType, Int32, ScrollOrientation)

メモ : このコンストラクタは、.NET Framework version 2.0新しく追加されたものです。

Type、NewValue、および ScrollOrientation の各プロパティ指定された値を使用して、ScrollEventArgs クラス新しインスタンス初期化します。

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

Public Sub New ( _
    type As ScrollEventType, _
    newValue As Integer, _
    scroll As ScrollOrientation _
)
Dim type As ScrollEventType
Dim newValue As Integer
Dim scroll As ScrollOrientation

Dim instance As New ScrollEventArgs(type,
 newValue, scroll)
public ScrollEventArgs (
    ScrollEventType type,
    int newValue,
    ScrollOrientation scroll
)
public:
ScrollEventArgs (
    ScrollEventType type, 
    int newValue, 
    ScrollOrientation scroll
)
public ScrollEventArgs (
    ScrollEventType type, 
    int newValue, 
    ScrollOrientation scroll
)
public function ScrollEventArgs (
    type : ScrollEventType, 
    newValue : int, 
    scroll : ScrollOrientation
)

パラメータ

type

ScrollEventType 値の 1 つ

newValue

スクロール バー新しい値。

scroll

ScrollOrientation 値の 1 つ

プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
ScrollEventArgs クラス
ScrollEventArgs メンバ
System.Windows.Forms 名前空間
ScrollEventType
ScrollOrientation

ScrollEventArgs プロパティ


ScrollEventArgs メソッド


ScrollEventArgs メンバ

Scroll イベントデータ提供します

ScrollEventArgs データ型公開されるメンバを以下の表に示します


パブリック コンストラクタパブリック コンストラクタ
パブリック プロパティパブリック プロパティ
パブリック メソッドパブリック メソッド
プロテクト メソッドプロテクト メソッド
参照参照

関連項目

ScrollEventArgs クラス
System.Windows.Forms 名前空間
ScrollBar.Scroll イベント
ScrollBar クラス
DataGridView クラス
DataGrid クラス



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

辞書ショートカット

すべての辞書の索引

「ScrollEventArgs」の関連用語

ScrollEventArgsのお隣キーワード
検索ランキング

   

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



ScrollEventArgsのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

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

©2024 GRAS Group, Inc.RSS