バージョン

RemoveAt メソッド (UltraExplorerBarItemsCollection)

指定したインデックスにある UltraExplorerBarItem をコレクションから削除します。
シンタックス
'宣言
 
Public Sub RemoveAt( _
   ByVal index As Integer _
) 
public void RemoveAt( 
   int index
)

パラメータ

index
使用例
Imports System.Diagnostics
Imports Infragistics.Win
Imports Infragistics.Win.UltraWinExplorerBar


	Private Sub Button87_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles button87.Click

		' Remove items from the Items collection using the different overloads.


		' Can't proceed unless we have at least 1 item in the first group.
		If (Me.ultraExplorerBar1.Groups.Count < 1 Or Me.ultraExplorerBar1.Groups(0).Items.Count < 1) Then
			Return
		End If


		' Items.Remove(UltraExplorerBarItem item)
		Dim item As UltraExplorerBarItem = Me.ultraExplorerBar1.Groups(0).Items(0)
		Me.ultraExplorerBar1.Groups(0).Items.Remove(item)


		' Items.RemoveAt(int index)
		If (Me.ultraExplorerBar1.Groups(0).Items.Count > 0) Then
			Me.ultraExplorerBar1.Groups(0).Items.RemoveAt(0)
		End If

	End Sub
using System.Diagnostics;
using Infragistics.Win;
using Infragistics.Win.UltraWinExplorerBar;


		private void button87_Click(object sender, System.EventArgs e)
		{
			// Remove items from the Items collection using the different overloads.


			// Can't proceed unless we have at least 1 item in the first group.
			if (this.ultraExplorerBar1.Groups.Count				< 1	||
				this.ultraExplorerBar1.Groups[0].Items.Count	< 1)
				return;


			// Items.Remove(UltraExplorerBarItem item)
			UltraExplorerBarItem item = this.ultraExplorerBar1.Groups[0].Items[0];
			this.ultraExplorerBar1.Groups[0].Items.Remove(item);


			// Items.RemoveAt(int index)
			if (this.ultraExplorerBar1.Groups[0].Items.Count > 0)
				this.ultraExplorerBar1.Groups[0].Items.RemoveAt(0);
		}
参照