Allow multi-select in a .NET TreeView

后端 未结 6 1538
太阳男子
太阳男子 2020-12-06 00:02

I\'m stuck in .NET 2.0 Windows Forms.

It doesn\'t look like the ability to select multiple nodes exists in the standard TreeView control.

I\'m t

6条回答
  •  旧巷少年郎
    2020-12-06 00:19

    The simplest solution would be to extend the existing TreeView control shipped with the framework and override the OnBeforeSelect and OnAfterSelect methods with logic to capture multiple selections.

    An example can be found here: http://www.arstdesign.com/articles/treeviewms.html

提交回复
热议问题