Gantt chart scroll bars problem

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
Bugsie
Newbie
Newbie
Posts: 15
Joined: Mon Jun 26, 2006 12:00 am
Location: Sydney

Gantt chart scroll bars problem

Post by Bugsie » Mon Oct 23, 2006 2:07 am

I want to use a gantt chart with a large number of items, more than easily put on a singe page.

I add a verticle scroll bar to the chart, (making sure it's "Chart" Property is set correctly) and generate Gantt entries, somethimes more than a pages worth.

The scroll bar does nothing except flash.

I I missing something here?

I have a example I will post to the steema public attachments.

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

Post by Narcís » Mon Oct 23, 2006 9:56 am

Hi Bugsie,

Thanks for the example project but I'm not able to run it because I don't have Unit1.cpp requested at:

Code: Select all

USEFORM("..\ChartLegend\Unit1.cpp", MyForm);
Would you be so kind to send it so that we can run the project here?

Thanks in advance.
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

Bugsie
Newbie
Newbie
Posts: 15
Joined: Mon Jun 26, 2006 12:00 am
Location: Sydney

Post by Bugsie » Mon Oct 23, 2006 11:31 am

:oops:
I have posted the fixed version to the news group
I left out the exe to reduce the size, and turned off debugging as the .tds was too large for the download

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

Post by Narcís » Mon Oct 23, 2006 3:45 pm

Hi Bugsie,

Thanks for your collaboration but I'm afraid TeeScroB.hpp is still missing :(.
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

Bugsie
Newbie
Newbie
Posts: 15
Joined: Mon Jun 26, 2006 12:00 am
Location: Sydney

Post by Bugsie » Mon Oct 23, 2006 10:39 pm

TeeScroB.hpp is one of your files. (Tee Chart Scroll!)

Whenever I start a new project I have to change

#include "TeeScroB.h" // added in automatically when the scrollbar is added.
to ...
#include "TeeScroB.hpp"

In the header. Try changing it back.

Cheers Bugsie

It is possible I have mispelt the $(TEEINCLUDEPATH) in the project include paths, as this environment variable does not work for me

Bugsie
Newbie
Newbie
Posts: 15
Joined: Mon Jun 26, 2006 12:00 am
Location: Sydney

Post by Bugsie » Tue Oct 24, 2006 12:30 am

This problem is very easy to reproduce, try this if it proves too hard to use my sample.

1) Create a new project
2) drop on a chart (it will get called Chart1)
3) Edit the chart and choose a gantt chart.
Set the "Points per Page" to a max of 25
4) Drop a chart scroll bar onto the form
5) make the scroll bar vertical and set its "Chart" property to Chart1
6) Set the ScrollBar Align to Property to "Right"
7) and the Chart Align Property to "Client"
8) For the "FormCreate" Event for the Form, Add the following code

Code: Select all

void __fastcall TForm1::FormCreate(TObject *Sender)
{
  TDate Today = TDate::CurrentDate();
  TDate today = Today;
  TDate nextday = today + 10;
  int d;
  for(d=1;d<50;d++){
    Series1->AddGantt(today,nextday,d,"x " + String(d));
    today = nextday;
    nextday += 10;
  }        
}
Run it to see the problem.

Note: you can scroll the gantt chart with the right mouse, but sometimes when attempting to use the scroll bar again I get a stack overflow.

Cheers
Bugsie

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

Post by Narcís » Tue Oct 24, 2006 2:57 pm

Hi Bugsie,

You'd better use a TScrollBar, TeeChart's scroll bar doesn't work very well. I've posted an example at the newsgroups on how to do that.
It is possible I have mispelt the $(TEEINCLUDEPATH) in the project include paths, as this environment variable does not work for me
Yes, it should be $(TEEINCPATH).
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

Bugsie
Newbie
Newbie
Posts: 15
Joined: Mon Jun 26, 2006 12:00 am
Location: Sydney

Post by Bugsie » Tue Oct 24, 2006 11:12 pm

Thanks Narcís
Your example using standard scroll bars works fine. :)
I will add this to my application.
Cheers
Bugsie.

Post Reply