How to determine location of treenode in TreeView control. RRS feed

  • Question

  • I am developing a user interface where certain data controls (e.g., textboxes) will be aligned with treenodes in a treeview control.  I imagine others have done this and would like to know the best approach for computing the current positions of treenodes, given that the user may collapse or expand treenodes at any time.  The approach I am considering is: traversing the prior visible nodes and computing the vertical position based on the sum of these visible treenodes.  Any advice will be appreciated.
    Jonathan Cook
    Friday, March 18, 2011 9:31 PM

All replies

  • You may get faster answers if you post to the class library forums so readers do not need to guess and have more expertise on the class library to begin with. If you can't find a class library forum, then which class library does the TreeView control belong? 

    The following is signature, not part of post
    Please mark the post answered your question as the answer, and mark other helpful posts as helpful, so they will appear differently to other users who are visiting your thread for the same problem.
    Visual C++ MVP
    Thursday, March 24, 2011 5:07 AM