Algorthim for graphical displaying a TreeView

Algorthim for graphical displaying a TreeView

Post by Callender,Li » Wed, 27 Oct 1999 04:00:00



I am in need of an algorithm to graphical display a treeview.  I am wanting
to show it as a heirarchy, with the root node displaying in a box at the top
of the chart and then with connecting lines going to its children and on
down the line.  The complexities around this are that I need to account for
spacing of the items in the display - both heighth and width wise.  The data
I am going to display will be stored in a VB tree control already - so I
will be having to navigate that to figure out the graphical display.  I am
looking for an algorithm that will position each node appropriately on the
graphical display as well as navigate the tree control.  I have searched the
web for such algorithms and have not come up with anything.

Example:
TreeView:
Root
|
|---ChildA
    |
    |----Child1
|---ChildB

Display:
                Root
        _________|__________
        |                  |
      ChildA             ChildB
        |
      Child1

   -**** Posted from RemarQ, http://www.remarq.com/?a ****-
 Search and Read Usenet Discussions in your Browser - FREE -

 
 
 

Algorthim for graphical displaying a TreeView

Post by Matt Cawl » Thu, 28 Oct 1999 04:00:00


Ah, that old chestnut.  :-)

I asked this question a few months back. I was pointed to a paper
called "A node positioning algorithm for general trees". The
algorithm contained there worked for me.

The display algorithm really is a separate issue from the VB tree
traversal. The latter is really quite trivial compared to the former.

Matt Cawley



>I am in need of an algorithm to graphical display a treeview.  I am wanting
>to show it as a heirarchy, with the root node displaying in a box at the top
>of the chart and then with connecting lines going to its children and on
>down the line.  The complexities around this are that I need to account for
>spacing of the items in the display - both heighth and width wise.  The data
>I am going to display will be stored in a VB tree control already - so I
>will be having to navigate that to figure out the graphical display.  I am
>looking for an algorithm that will position each node appropriately on the
>graphical display as well as navigate the tree control.  I have searched the
>web for such algorithms and have not come up with anything.

>Example:
>TreeView:
>Root
>|
>|---ChildA
>    |
>    |----Child1
>|---ChildB

>Display:
>                Root
>        _________|__________
>        |                  |
>      ChildA             ChildB
>        |
>      Child1

>   -**** Posted from RemarQ, http://www.remarq.com/?a ****-
> Search and Read Usenet Discussions in your Browser - FREE -


 
 
 

1. C++ Source code to display a graphical image??

Hi

I've looked around the WWW and have been unable to find a program to
perform the function that I require.

Function: to display an image from a file onscreen.

Can anyone pointb me in the right direction upon where I can find C++
source code to display a graphics file e.g *.pcx/tiff/bmp in vga 256
colour mode max(320x200).

The source code must be able to run on Borland C++ v3.1/v4.

Any help regarding this would be most appreciated

Aj

Department of Electronic & Electrical Engineering
University of Salford
UK


2. ***Game Designers who want a serious 3d modelor

3. ANNOUNCE: CLEARweb, Graphical Display of Internet Addresses

4. How do you retrieve .gif or .jpg from .res file in VB5?

5. Summary: Graphical library/toolkit for map display (long)

6. problems with multiple windows

7. Graphical library/toolkit for map display

8. Saving multiple d3dx meshes to the same .x file

9. Graphical display tool for Petri nets

10. C++ Source code to display a graphical image??

11. PostMan Delivery algorthim

12. 'line' algorthim in c

13. Advanced TreeView algorithm needed ..