Klaus wrote:if word 1 of control i = "group" AND the dgcontrol of control i <> EMPTY AND the dgcontrol of the owner of control i = EMPTY then
...
It is a datagrid
As Datagrid contains nested groups, I'm not sure it will work.
Finally, this is what I've done.
In a first pass, I built a list containing all the IDs of the datagrids with your first script:
Code: Select all
if the dgcontrol of control i <> EMPTY then put the id of contro o & return after dataGridsIdList
This returns Datagrids IDs but also all the Datagrids elements. Furthermore, some Datagrids elements (like graphics) have no dgcontrol.
So, in a second pass, I check if a given control is part of the datagrids previously listed in
dataGridsIdList with this function:
Code: Select all
function isControlInDatagrid givenControlId,cardId,dataGridsIdList
get the id of the owner of control id givenControlId
if it = cardId then return false
get lineOffset(it,dataGridsIdList)
if it = 0 then
return isControlInDatagrid(it,cardId,dataGridsIdList)
else return true
end isControlInDatagrid
... and sorry for my poor english