Clicking on Gantt chart labels

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
Tri-Direct
Newbie
Newbie
Posts: 11
Joined: Tue Aug 24, 2004 4:00 am

Clicking on Gantt chart labels

Post by Tri-Direct » Tue Nov 09, 2004 4:44 pm

I am drawing a Ganttchart. Some of the bar items drawn are single days and some are periods.

The bars which are single days are obviously very small and hard for a user to click on.

How can I code to detect the user clicking on the actual label above/on the bar, and work out which one they have clicked on ?

cheers

Mat

Pep
Site Admin
Site Admin
Posts: 3298
Joined: Fri Nov 14, 2003 5:00 am
Contact:

Post by Pep » Wed Nov 10, 2004 7:59 am

Hi Mat,

how about using the OnMouseEnter event for the Series or the OnMouseMove event and the Clicked method of the Series ?

Tri-Direct
Newbie
Newbie
Posts: 11
Joined: Tue Aug 24, 2004 4:00 am

Post by Tri-Direct » Wed Nov 10, 2004 10:28 am

the problem is that the bars are displayed very small on the chart (they are just single days and the chart shows a full year). Even with the Series.clicked , it only reacts to clicking on the actual bar, not the "bigger" mark text i.e even though the bar is small, the mark text shows something such as "Review Meeting"

I want the user to be able to click on this text and not worry about trying to click 5 times trying to get the mouse on a small bar.

Pep
Site Admin
Site Admin
Posts: 3298
Joined: Fri Nov 14, 2003 5:00 am
Contact:

Post by Pep » Wed Nov 10, 2004 12:53 pm

Hi Mat,
clicking on the actual bar, not the "bigger" mark text i.e even though the bar is small, the mark text shows something such as "Review Meeting"
A trick could be the change the mouse cursor when the mouse is over the Series (using the Clicked method in the OnMouseMove event).
I want the user to be able to click on this text and not worry about trying to click 5 times trying to get the mouse on a small bar.
In that case, to do this you will have to use the Clicked method of the TSeriesMarks in the OnMouseMove event.

Tri-Direct
Newbie
Newbie
Posts: 11
Joined: Tue Aug 24, 2004 4:00 am

Post by Tri-Direct » Wed Nov 10, 2004 1:11 pm

thanks very much for your patience and quick reply.

I'll give it a go this afternoon

thanks again

Mat

Post Reply