Hi there
We have a CXTPReportControl - derived object which we use to display a hierarchical tree view of certain objects. One of the features of our control is that when a user clicks on the "+" under a collapsed item in the tree while holding the "ctrl" key, the tree item recursively expands itself and all its children until it terminates at the leaf children.
We made the jump from XTP v12.0.2 to 15.1.3 last October, and then to 15.2.1 last month. However, we noticed with the October jump that strange behaviour was introduced with the feature mentioned above. What happens now is that if a user multi selects tree items and clicks on the "+" of one of the selected items while holding ctrl, the children of the expanded item appear above all the top level items, but they appear at the correct depth if you follow me:
So in the image above, the folder "contacts decompile" should appear as a child of the "act" child of "contacts.chm" but it appears as the first item in the tree.
The code we use to perform the recursive expansion is as follows:
//pointer to control hosting this CXTPReportRow CReportControlEx* pReportControl = (CReportControlEx*)GetControl(); CXTPReportRows* pChildRows = GetChilds();
pReportControl->ExpandRows(pChildRows);
Then below we have void CReportControlEx::ExpandRows(CXTPReportRows* pRows)
{
for(int nRowIndex=0; nRowIndex < pRows->GetCount(); nRowIndex++)
{
CXTPReportRow* pRow = pRows->GetAt(nRowIndex);
pRow->SetExpanded(TRUE);
CXTPReportRows* pChildRows = pRow->GetChilds();
ExpandRows(pChildRows);
}
}
We're stumped as to what is causing this behaviour, but we reckon it could be a conflict between code on our side and tree handling code in the Xtreme Toolkit -has anyone any idea what might be? Thanks Eric
------------- Eric
Product: Xtreme Toolkit Version 22.0
Platform: Windows 11 (64bit) -
Language: Visual C++ 2022 /C# .NET 2/3.5/4/5/6/7
|