Forum
Please
Log In
to post a new message or reply to an existing one. If you are not registered, please
register.
NOTE: Some forums may be read-only if you are not currently subscribed to
our technical support services.
Subject |
Author |
Date |
|
Peter Meier
|
Oct 21, 2008 - 10:32 AM
|
Hi The following statement seems not to be working in the V2.83: m_treeGrid.ItemEnsureExpanded(hTreeItem, true);
If I replace it with the following, everything works well:
if (!m_treeGrid.ItemIsExpanded(hTreeItem))
{
m_treeGrid.ItemExpand(hTreeItem, TVE_EXPAND, true);
} These code snippets should be equivalent, right? To me it seems to be a bug, or then I do not understand the ItemEnsureExpanded propperly. Regards - Peter
|
|
Technical Support
|
Oct 21, 2008 - 1:10 PM
|
The CExtTreeGridWnd::ItemEnsureExpanded() method does not change the expanded state of the specified tree item. It makes each tree item in chain of parent tree items expanded. As a result the specified tree item becomes available in the vertically scrollable range of tree rows. So, you should simply invoke the m_treeGrid.ItemIsExpanded(hTreeItem); code without if statement and then invoke the _treeGrid.ItemExpand(hTreeItem, TVE_EXPAND, true); code.
|
|