Page 1 of 1

AutoPosition Node

Posted: Fri Apr 16, 2010 4:33 pm
by 10551078
Hi,

hello

I'm looking for how to draw a tree correctly (with TOP ChilManager format)

How to correctly position the Node with "AutoPosition" ?

I tried with "self-positing" nothing but.


exemple:


Child11
child1 child12
child13
Root_A Child14

child21
child2 child22

child3 Child33

Re: AutoPosition Node

Posted: Mon Apr 19, 2010 9:46 am
by narcis
Hi mivchart,

Have you tried doing as the Child Managers -> Top-Bottom example in TeeTree2 demo?

Re: AutoPosition Node

Posted: Mon Apr 19, 2010 1:07 pm
by 10551078
yes, I tried starting the demo. but it's not very realistic !

In my case I have to make a tracing of parent nodes X and Y with children!

How to have an automatic positioning regardless of the number of nodes.

With Explorer, the positioning of the nodes is automatic.
How do the same with a Children Top align?

I store the values like this:

ID, IDPARENT , VALUE
1 0 START
2 1 A
3 1 B
4 1 C
5 2 A2
6 2 A3
7 3 B2
8 3 B3
9 4 C2
10 7 B4
etc...

Re: AutoPosition Node

Posted: Thu Apr 22, 2010 12:03 pm
by narcis
Hi mivchart,

Ok, you can do set AutoPosition and AutoSize like this:

Code: Select all

  for i:=0 to Tree1.Items.Count-1 do
  begin
    Tree1.Items[i].AutoPosition.Left:=True;
    Tree1.Items[i].AutoPosition.Top:=True;
    Tree1.Items[i].AutoSize:=True;
  end;
Hope this helps!