Tennis single or double elimination diagram

TeeTree VCL for Borland Delphi and C++ Builder.
Post Reply
Tom
Newbie
Newbie
Posts: 7
Joined: Tue Apr 27, 2004 4:00 am

Tennis single or double elimination diagram

Post by Tom » Mon Nov 15, 2004 7:31 pm

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

tom
Advanced
Posts: 211
Joined: Mon Dec 01, 2003 5:00 am
Contact:

Post by tom » Wed Nov 17, 2004 9:07 pm

Sorry, can you provide more information:

eg:

* picture
* the required functionalities.

Thanks,
tom

Tom
Newbie
Newbie
Posts: 7
Joined: Tue Apr 27, 2004 4:00 am

Post by Tom » Thu Nov 18, 2004 3:20 pm

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

tom
Advanced
Posts: 211
Joined: Mon Dec 01, 2003 5:00 am
Contact:

Post by tom » Mon Nov 22, 2004 3:53 pm

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]

Post Reply