Skip to content

Idea about when building subtree #54

@klaus101

Description

@klaus101

Is your feature request related to a problem? Please describe.
This is my 3rd and actually last thought i'd like to share.
What is it about? A bug or issue? Surely not. A feature request? Rather not. More an idea to check if it is feasable:

When building a tree structure with probably deep nesting, trying to create the desired target node, it happens that nodes are created. selected and expanded, the needed child nodes are created. selected and expanded and so on.
This population process is literally visible in explorer plugin forks.

Describe the solution you'd like
From other program contexts / languages i know that it is a well established method to suspend node building painting until the target node had been created.
The keywords (pascal:) are BeginUpdate/EndUpdate, and behind this is SendMessage(treeviewhandle ,WM_SETREDRAW, false/true, 0)

Explorer tools written in C++ do use such method also. Rude logic something like:

  • Create root node(s)
  • SendMessage(m_hTreeView,WM_SETREDRAW,(WPARAM)FALSE,(LPARAM)NULL);
  • Populate desired subtree
  • SendMessage(m_hTreeView,WM_SETREDRAW,(WPARAM)TRUE,(LPARAM)NULL)
    Effect: the control comes up instantly and the desired target node is directly visible, as intermediate paintings are avoided.
    Admittedly, what i do not know at all, is if this is applicable for apps using theming.

But wouldn't it be worthy to try it out? (At the end not more than two SendMessages at the right place).

Additional context
OS is Windows 10 x64, NPP is 8.5 x64 the portable version
The funap explorer plugin is 1.8.2.18, the x64 version.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions