AutoPosition Node

TeeTree VCL for Borland Delphi and C++ Builder.
Post Reply
mivchart
Newbie
Newbie
Posts: 31
Joined: Thu Dec 04, 2008 12:00 am

AutoPosition Node

Post by mivchart » Fri Apr 16, 2010 4:33 pm

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

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Re: AutoPosition Node

Post by Narcís » Mon Apr 19, 2010 9:46 am

Hi mivchart,

Have you tried doing as the Child Managers -> Top-Bottom example in TeeTree2 demo?
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

mivchart
Newbie
Newbie
Posts: 31
Joined: Thu Dec 04, 2008 12:00 am

Re: AutoPosition Node

Post by mivchart » Mon Apr 19, 2010 1:07 pm

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...

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Re: AutoPosition Node

Post by Narcís » Thu Apr 22, 2010 12:03 pm

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!
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Post Reply