ComboBox.GetCount

number ComboBox.GetCount ( 

string ObjectName )

Example 1

-- Get the number of items currently in the "ComboBox1" combobox object.
num_items = ComboBox.GetCount("ComboBox1");

-- Display the number of items in the combobox.
Dialog.Message("Item Count", "There are currently "..num_items.." items in the combobox.", MB_OK, MB_ICONINFORMATION, MB_DEFBUTTON1);

-- Add four new items to the "ComboBox1" combobox object.
ComboBox.AddItem("ComboBox1", "Item One", "C:\\One.txt");
ComboBox.AddItem("ComboBox1", "Item Two", "C:\\Two.txt");
ComboBox.AddItem("ComboBox1", "Item OneThree", "C:\\OneThree.txt");
ComboBox.AddItem("ComboBox1", "Item Four", "C:\\Four.txt");

-- Get the number of items currently in the "ComboBox1" combobox object.
num_items = ComboBox.GetCount("ComboBox1");

-- Display the number of items in the combobox.
Dialog.Message("Item Count", "There are currently "..num_items.." items in the combobox.", MB_OK, MB_ICONINFORMATION, MB_DEFBUTTON1);

Gets the number of items in combobox object "ComboBox1" and displays the result to the user.  Four objects are then added, and the count is retrieved again.

See also:  Related Actions