Just wondering whether anybody could shed come light on a problem that I am having with a set of TreeItems within a TreeList.
I have a simple trivial method that is supposed to just display a MessageBox or return a bool depending on whether the TreeList item is Checked or not. So, I am testing the Checked attribute - problem is, no matter what state the gui control is in (be it checked or not checked) it always returns/or displays false.
As far as I understand it from the developers, that this is a standard .NET control and there should be nothing unusual about it. Also, if you inspect the control using the Ranorex Spy tool, it seems that there is only two attributes in AccessibleState namley Expanded and Selectable; although the control appears to have the Checked attribute under the TreeItem details.
The code for the method is below and attached is the snapshot of the TreeList and sub-TreeItems.
public static void isCategoryVariableChecked(String var) { foreach(TreeItem t in getListOfCategoryVariables()) { if(t.Text==var && t.Checked) { MessageBox.Show(t.Checked.ToString()); } } }If anybody has any ideas that would be appreciated.
C