Phantom Documentation

[Help Home] [Phantom Home]
ListView Functions

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


            GetColumnCount
            GetColumnText
            GetCount
            GetItemText
            Select
Example Code

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

# Open the ListView control
PhantomTarget._Controls.List_View.Select();

# Add some columns and items
List.Edit1.SetText("Col 1");
List.Add[1].Click();
List.Edit1.SetText("Col 2");
List.Add[1].Click();

List.Edit1.SetText("Item 1");
List.Add[0].Click();
List.Edit1.SetText("Item 2");
List.Add[0].Click();

# Get the count
int i = List.SysListView321.GetCount();
disp(i);

# Get the number of columns
i = List.SysListView321.GetColumnCount();
disp(i);

# Get the text of the 2nd row, first column
string s = List.SysListView321.GetItemText(1, 0);
disp(s);

# Get the second column's text
s = List.SysListView321.GetColumnText(1);
disp(s);

# Select some items
List.SysListView321.Select(0);
List.SysListView321.Select(1);

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



See Also: ListView Class



Copyright 2000-2011 Phantom Automated Solutions