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

Dim instance As BindingManagerBase Dim value As Integer value = instance.Position instance.Position = value
/** @property */ public abstract int get_Position () /** @property */ public abstract void set_Position (int value)
基になるリストの中での位置を指定する、0 から始まるインデックス番号。

Position プロパティを使用して、BindingManagerBase によって維持されている、基になるリストを反復処理します。最初の項目に移動するには、Position を 0 に設定します。リストの末尾に移動するには、Position を Count プロパティから 1 を引いた値に設定します。

Position プロパティを設定する 4 つのメソッドのコード例を次に示します。MoveNext メソッドは、プロパティを 1 ずつインクリメントします。MovePrevious メソッドは、プロパティを 1 ずつデクリメントします。MoveFirst メソッドは、プロパティを 0 に設定します。MoveLast メソッドは、プロパティを Count プロパティから 1 を引いた値に設定します。
Private Sub BindingManagerBase_CurrentChanged(sender As Object, e As EventArgs) ' Print the new value of the current object. Console.Write("Current Changed: ") Console.WriteLine(CType(sender, BindingManagerBase).Current) End Sub 'BindingManagerBase_CurrentChanged Private Sub MoveNext() ' Increment the Position property value by one. myBindingManagerBase.Position += 1 End Sub 'MoveNext Private Sub MovePrevious() ' Decrement the Position property value by one. myBindingManagerBase.Position -= 1 End Sub 'MovePrevious Private Sub MoveFirst() ' Go to the first item in the list. myBindingManagerBase.Position = 0 End Sub 'MoveFirst Private Sub MoveLast() ' Go to the last row in the list. myBindingManagerBase.Position = myBindingManagerBase.Count - 1 End Sub 'MoveLast
private void BindingManagerBase_CurrentChanged (object sender, EventArgs e) { // Print the new value of the current object. Console.Write("Current Changed: "); Console.WriteLine(((BindingManagerBase)sender).Current); } private void MoveNext() { // Increment the Position property value by one. myBindingManagerBase.Position += 1; } private void MovePrevious() { // Decrement the Position property value by one. myBindingManagerBase.Position -= 1; } private void MoveFirst() { // Go to the first item in the list. myBindingManagerBase.Position = 0; } private void MoveLast() { // Go to the last row in the list. myBindingManagerBase.Position = myBindingManagerBase.Count - 1; }
private: void BindingManagerBase_CurrentChanged( Object^ sender, EventArgs^ /*e*/ ) { // Print the new value of the current object. Console::Write( "Current Changed: " ); Console::WriteLine( ( (BindingManagerBase^)(sender) )->Current ); } void MoveNext() { // Increment the Position property value by one. myBindingManagerBase->Position = myBindingManagerBase->Position + 1; } void MovePrevious() { // Decrement the Position property value by one. myBindingManagerBase->Position = myBindingManagerBase->Position - 1; } void MoveFirst() { // Go to the first item in the list. myBindingManagerBase->Position = 0; } void MoveLast() { // Go to the last row in the list. myBindingManagerBase->Position = myBindingManagerBase->Count - 1; }
private void BindingManagerBase_CurrentChanged(Object sender, EventArgs e) { // Print the new value of the current object. Console.Write("Current Changed: "); Console.WriteLine(((BindingManagerBase)(sender)).get_Current()); } //BindingManagerBase_CurrentChanged private void MoveNext() { // Increment the Position property value by one. myBindingManagerBase.set_Position(myBindingManagerBase.get_Position() + 1); } //MoveNext private void MovePrevious() { // Decrement the Position property value by one. myBindingManagerBase.set_Position(myBindingManagerBase.get_Position() - 1); } //MovePrevious private void MoveFirst() { // Go to the first item in the list. myBindingManagerBase.set_Position(0); } //MoveFirst private void MoveLast() { // Go to the last row in the list. myBindingManagerBase.set_Position(myBindingManagerBase.get_Count() - 1); } //MoveLast

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

- BindingManagerBase.Position プロパティのページへのリンク