CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    Sep 2009
    Posts
    4

    Tree View: alphabetical sort after label editing

    What is the recommended method to sort siblings in a tree view after label editing has been completed (without responding to TVN_ITEMCHANGED or other Vista+ notifications)?

  2. #2
    Join Date
    Dec 2011
    Location
    Bucharest, Romania
    Posts
    29

    Re: Tree View: alphabetical sort after label editing

    hope to not reply when i dont know
    Last edited by john wiley; February 6th, 2012 at 06:14 PM.

  3. #3
    Join Date
    Sep 2009
    Posts
    4

    Re: Tree View: alphabetical sort after label editing

    Sibling: as in same level in the tree view hierarchy that share the same parent item.
    By "without Vista+" I mean before Vista or later, as in available in XP. For example TVN_ITEMCHANGED and TVN_ITEMCHANGING according to the documentation are available in Windows Vista or later.

    Basically all I was asking was if there was any recommended method to sort siblings after a successful label edit. By successful label edit, I mean TVN_ENDLABELEDIT returns TRUE. Sorting within TVN_ENDLABELEDIT does not yield correct results since TVN_ENDLABELEDIT must return TRUE before the item text is actually changed.

    Currently I just use the TreeView_SetItem, TreeView_GetParent and TreeView_SortChildren macros to set the text, then sort the children of the parent within TVN_ENDLABELEDIT. Then I just don't return TRUE.

  4. #4
    Join Date
    Dec 2011
    Location
    Bucharest, Romania
    Posts
    29

    Re: Tree View: alphabetical sort after label editing

    Thankyou for explaining, when it comes to windows I know only dialogs, buttons. Trees I haven’t tried.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured