ISComboBox.Sorted

Description

This property is True if the items of the specified combo box are sorted. The property is not accessible in the Object Inspector.

Syntax

object.Sorted

Part Attribute Type Description
object Required
The object always implements the ISComboBox interface

Return Value

bool

Example

Display Sorted for the specified combo box.

Dim aComboBox
Dim aItems
Dim i
Dim aContent
Dim aComboBoxInfo

Set aComboBox = Form.Controls_("cmbInform")
set aItems = aComboBox.Items 
aItems.Clear

aComboBox.Sorted = true

aItems.Add("Hanna")
aItems.Add("Tanya")
aItems.Add("Yulija")
aItems.Add("Veronicka")
aItems.Add("Katherina")
aItems.Add("Helen")
aItems.Add("Mary")

for i = 0 to aItems.Count - 1
  aContent = aContent & vbNewLine & "- " & aItems.Strings(i)  
next  

aComboBoxInfo =_
  "Caption: " & aComboBox.Caption & vbNewLine &_ 
  "ShortName: " & aComboBox.ShortName & vbNewLine &_
  "ComboBox Sorted = " & aComboBox.Sorted & vbNewLine &_
  "ComboBox Items:" & aContent  
 
Profile.MsgBox(aComboBoxInfo)  
Note: This macro should be executed in any event handler of the form control.

Version information

Added in v7.8.0