Page 1 of 1
Gantt chart scroll bars problem
Posted: Mon Oct 23, 2006 2:07 am
by 9241686
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.
Posted: Mon Oct 23, 2006 9:56 am
by narcis
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.
Posted: Mon Oct 23, 2006 11:31 am
by 9241686
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
Posted: Mon Oct 23, 2006 3:45 pm
by narcis
Hi Bugsie,
Thanks for your collaboration but I'm afraid
TeeScroB.hpp is still missing
.
Posted: Mon Oct 23, 2006 10:39 pm
by 9241686
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
Posted: Tue Oct 24, 2006 12:30 am
by 9241686
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"
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
Posted: Tue Oct 24, 2006 2:57 pm
by narcis
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).
Posted: Tue Oct 24, 2006 11:12 pm
by 9241686
Thanks NarcĂs
Your example using standard scroll bars works fine.
I will add this to my application.
Cheers
Bugsie.