#
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();
|