Page 1 of 1

Tennis single or double elimination diagram

Posted: Mon Nov 15, 2004 7:31 pm
by 9337244
Would TeeTree be Ok to use to generate a single or double eliminiation diagram like you would see at a tennis tourniment?

Thanks
Tom Berry

Posted: Wed Nov 17, 2004 9:07 pm
by Tom
Sorry, can you provide more information:

eg:

* picture
* the required functionalities.

Thanks,
tom

Posted: Thu Nov 18, 2004 3:20 pm
by 9337244
When I try to make the diagram the editor takes out the spaces so it will not look like I want it to.

It is a typical single elimination diagram where two players play and the winner plays the winner of another match.

It has all the teams playing on the left side and the winner on the right side.

And I would like to be able to enter the names of the players as they advance in the tournment.

Any help?
Thanks
Tom Berry

Posted: Mon Nov 22, 2004 3:53 pm
by Tom
Hi,

1) Positioning:

Depending on which AlignChild you use, you can change the spaces between the nodes. eg in de TTreeLeftRightAlignChild manager, you can change the horizontal & vertical spaces by the following properties:

Code: Select all

procedure TLeftRightAlignForm.ScrollBar2Change(Sender: TObject);
begin
  SideAlign.VertMargin:=ScrollBar2.Position;
  Tree1.Invalidate;
end;

procedure TLeftRightAlignForm.ScrollBar1Change(Sender: TObject);
begin
  SideAlign.HorizMargin:=ScrollBar1.Position;
  Tree1.Invalidate;
end;
If no alignmanager can provide the functionality you need, you can either, fix position the nodes (thus overuling the automatic positioning of the alignmanager) or create your own alignmanager descendant.

2) Editing

To change the names directly on the diagram, you've to set the node in editing mode:

Code: Select all

Tree1.StartEditing(Node1);
Default the F2 key puts the selected node in editing mode as well.

More information can be found in the teeTree2 demo application:

Welcome > Nodes > Adding/Modifying
Welcome > Tree Features > Text Editor ReadOnly

Regards,
Tom.[/code]