I have made a user control with a TreeListView control in it. This works fine when placed in a Winforms app, but when used in a CustomTaskPane in Excel it will not expand the nodes when the + sign is clicked.
The underlying model expands correctly when I manually call ExpandAll, so it seems that CanExpandGetter and ChildrenGetter work correctly, but for some reason the + sign will not work.
I have also assigned an Imagelist to SmallImageList.
Is there some Winforms voodoo that I should know about that might prevent this from working? The Control derives from UserControl and is ComVisible. I have used normal treeview in TaskPanes and they work fine, so there seems to be something special with the combination TreeListView and ExcelDNA.CustomTaskPane..
I can mail the sample project to reproduce on request.
It's not well documented -- note the subtle use of understatement :) -- but there is a magic switch for this:
On the "What's New" page, there is this note:
Added
CanUseApplicationIdle
property to cover cases whereApplication.Idle
events are not triggered. In some contexts – specifically VisualStudio and Office extensions – theApplication.Idle
events are never triggered. If you setCanUseApplicationIdle
tofalse
, ObjectListView will correctly handle these situations.