バージョン

FindStringExact(String,Int32) メソッド

FindString メソッド
シンタックス
'宣言
 
Public Overloads Overridable Function FindStringExact( _
   ByVal s As String, _
   ByVal startIndex As Integer _
) As Integer
public virtual int FindStringExact( 
   string s,
   int startIndex
)

パラメータ

s
検索する文字列
startIndex
最初の検索対象項目のインデックス。

戻り値の型

指定した文字列と完全に一致する最初の項目のインデックス
使用例
Imports Infragistics.Win
Imports Infragistics.Win.UltraWinEditors

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

        '	Set focus to the UltraComboEditor
        Me.UltraComboEditor1.Focus()

        '	Clear the existing list
        Me.UltraComboEditor1.Items.Clear()

        '	Add 5 items to the list
        Me.UltraComboEditor1.Items.Add(1, "One")
        Me.UltraComboEditor1.Items.Add(2, "Two")
        Me.UltraComboEditor1.Items.Add(3, "Three")
        Me.UltraComboEditor1.Items.Add(4, "Four")
        Me.UltraComboEditor1.Items.Add(5, "Five")

        '	Show the list portion
        Me.UltraComboEditor1.DropDown()

        '	Use the FindString method to determine the index of the
        '	item whose text is "Four"
        Dim index As Integer = Me.UltraComboEditor1.FindStringExact("Four", 0)

        '	Set the SelectedIndex property to the item we found
        '	via the call to the FindString method
        Me.UltraComboEditor1.SelectedIndex = index

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

		private void button1_Click(object sender, System.EventArgs e)
		{
			//	Set focus to the UltraComboEditor
			this.ultraComboEditor1.Focus();

			//	Clear the existing list
			this.ultraComboEditor1.Items.Clear();
			
			//	Add 5 items to the list
			this.ultraComboEditor1.Items.Add( 1, "One" );
			this.ultraComboEditor1.Items.Add( 2, "Two" );
			this.ultraComboEditor1.Items.Add( 3, "Three" );
			this.ultraComboEditor1.Items.Add( 4, "Four" );
			this.ultraComboEditor1.Items.Add( 5, "Five" );
			
			//	Show the list portion
			this.ultraComboEditor1.DropDown();

			//	Use the FindString method to determine the index of the
			//	item whose text is "Four"
			int index = this.ultraComboEditor1.FindStringExact( "Four", 0 );

			//	Set the SelectedIndex property to the item we found
			//	via the call to the FindString method
			this.ultraComboEditor1.SelectedIndex = index;

		}
参照