Phantom Documentation

[Help Home] [Phantom Home]
ComboBox Functions

The following functions are for use with the ComboBox type class.

            Select

            GetCount
            GetElement

Example Code

# Include Phantom Target Declarations
use "PhantomTarget.dec";
System("PhantomTarget.exe");

# Open the combo box
PhantomTarget._Controls.Combo_Box.Select();

# Add some items
Combo.Edit1.SetText("Item 1");
Combo.Insert.Click();
Combo.Edit1.SetText("Item 2");
Combo.Insert.Click();
Combo.Edit1.SetText("Item 3");
Combo.Insert.Click();

# Get the count
int iCount = Combo.ComboBox1.GetCount();
disp(iCount);

# Cycle through the count and select each one,
# and get its text
for(int i = 0; i < iCount; i++){
  Combo.ComboBox1.Select(i);
  disp(Combo.ComboBox1.GetElement(i));
}

# Exit out
Combo.OK.Click();
PhantomTarget.Close();



See Also: ComboBox Class



Copyright 2000-2011 Phantom Automated Solutions