2008-01-31, 17:16
This function doesn't seem to work anymore. It used to, but now code I have that uses it doesn't function properly.
If I do ControlGroup(9000).HasFocus(0), I always get a true.
If I do ControlGroup(9000).HasFocus(10), I always get a false.
According to the docs, a control ID of 0 should return true if any control in that group is focused, false otherwise. A control ID of a specific control (ie 10), would return true if that control in that group has focus.
"Returns true if the control group with id “group” has control id “id” as it's focused item. If “id” is not present, or is 0, then it will return true if the currently focused control is in the control group with id “group”. Note that if the control group with id “group” does not have focus, then this will still return true if the last focused item in the group had control id “id”."
At the moment I am working around it by just doing a Control(10).HasFocus, and for the "Any control", I just do a whole bunch of ORd conditions.
If I do ControlGroup(9000).HasFocus(0), I always get a true.
If I do ControlGroup(9000).HasFocus(10), I always get a false.
According to the docs, a control ID of 0 should return true if any control in that group is focused, false otherwise. A control ID of a specific control (ie 10), would return true if that control in that group has focus.
"Returns true if the control group with id “group” has control id “id” as it's focused item. If “id” is not present, or is 0, then it will return true if the currently focused control is in the control group with id “group”. Note that if the control group with id “group” does not have focus, then this will still return true if the last focused item in the group had control id “id”."
At the moment I am working around it by just doing a Control(10).HasFocus, and for the "Any control", I just do a whole bunch of ORd conditions.