Forum Discussion
TanyaYatskovska
Alumni
12 years agoHi,
Thanks for the sample. I've used the script from this How To article to enable a check box next to the specified tree item. I only modified the Main_Sample function in this way:
function Main_Sample()
{
var p = Sys.Process("TreeListCheckbox");
var wMain = p.WinFormsObject("Form1");
wMain.Activate();
var wTreeList = wMain.WinFormsObject("treeList1");
var nodes = wTreeList.Nodes;
var nodeStr = "root|b";
var colStr = "Visible";
if (clickNode(wTreeList, nodes, nodeStr, colStr, 0))
{
Log.Message("The '" + nodeStr + "' node was successfully clicked.");
}
}