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

Dim instance As ToolStripComboBox Dim value As Boolean value = instance.Sorted instance.Sorted = value
/** @property */ public boolean get_Sorted () /** @property */ public void set_Sorted (boolean value)
コンボ ボックスが並べ替えられた場合は true。それ以外の場合は false。既定値は false です。

このプロパティは、ToolStripComboBox で既存のエントリを並べ替え、新しいエントリを並べ替えたリスト内の適切な位置に追加するかどうかを指定します。このプロパティを使用して、ToolStripComboBox 内の項目を自動的に並べ替えることができます。並べ替えられた ToolStripComboBox に項目を追加すると、追加された項目は並べ替えられたリスト内の適切な位置に移動されます。プロパティを false に設定すると、新しい項目は既存のリストの末尾に追加されます。並べ替えは、大文字小文字を区別しないアルファベットの昇順で行われます。

ToolStripComboBox に対し、Sorted プロパティなど、各種のプロパティを設定するための構文を次のコード例に示します。
' The following code example demonstrates the syntax for setting ' various ToolStripComboBox properties. ' toolStripComboBox1.AutoCompleteCustomSource.AddRange(New String() {"aaa", "bbb", "ccc"}) toolStripComboBox1.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.SuggestAppend toolStripComboBox1.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.CustomSource toolStripComboBox1.DropDownHeight = 110 toolStripComboBox1.DropDownWidth = 122 toolStripComboBox1.FlatStyle = System.Windows.Forms.FlatStyle.Standard toolStripComboBox1.IntegralHeight = False toolStripComboBox1.Items.AddRange(New Object() {"xxx", "yyy", "zzz"}) toolStripComboBox1.MaxDropDownItems = 9 toolStripComboBox1.MergeAction = System.Windows.Forms.MergeAction.Insert toolStripComboBox1.Name = "toolStripComboBox1" toolStripComboBox1.Size = New System.Drawing.Size(121, 25) toolStripComboBox1.Sorted = True
// The following code example demonstrates the syntax for setting // various ToolStripComboBox properties. // toolStripComboBox1.AutoCompleteCustomSource.AddRange(new string[] { "aaa", "bbb", "ccc"}); toolStripComboBox1.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.SuggestAppend; toolStripComboBox1.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.CustomSource; toolStripComboBox1.DropDownHeight = 110; toolStripComboBox1.DropDownWidth = 122; toolStripComboBox1.FlatStyle = System.Windows.Forms.FlatStyle.Standard; toolStripComboBox1.IntegralHeight = false; toolStripComboBox1.Items.AddRange(new object[] { "xxx", "yyy", "zzz"}); toolStripComboBox1.MaxDropDownItems = 9; toolStripComboBox1.MergeAction = System.Windows.Forms.MergeAction.Insert; toolStripComboBox1.Name = "toolStripComboBox1"; toolStripComboBox1.Size = new System.Drawing.Size(121, 25); toolStripComboBox1.Sorted = true;

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 によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


- ToolStripComboBox.Sorted プロパティのページへのリンク