Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Gantt charts using FlowChartX (Read 5485 times)
TheSmartGuy
YaBB Newbies
*
Offline



Posts: 4
Joined: Aug 7th, 2005
Gantt charts using FlowChartX
Sep 12th, 2005 at 7:34am
Print Post  
One of the screenshots in your gallery page apparently shows a gantt chart. Is that really done with the flowchart control?  If so, how can I create a header which stays immovable on the screen while the rest of the chart is scrolled up or down?

Thanks
  
Back to top
 
IP Logged
 
TheSmartGuy
YaBB Newbies
*
Offline



Posts: 4
Joined: Aug 7th, 2005
Re: Gantt charts using FlowChartX
Reply #1 - Sep 12th, 2005 at 7:45am
Print Post  
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Gantt charts using FlowChartX
Reply #2 - Sep 12th, 2005 at 2:35pm
Print Post  
I don't know whether that's a Gantt chart, but I can think of couple ways to draw immovable headers.

1) with a custom drawing. I.e. put a helper Box in the foreground by calling ZTop. Make it custom drawn by setting its CustomDraw property to cdFull. Handle the CustomDraw event and draw the headers starting from the flowchart's ScrollX and ScrollY coordinates. Thus the headers will always be drawn from the top-left point of the flowchart. You might want to set Locked = true to prevent users to select the 'headers' box.

- or -

2) Use several helper boxes to represent the header. Handle the Scroll event and move those boxes relative to the new ScrollX/ScrollY position, so they won't change their position visually.

They might be more ways to implement that, I'll ask the devs around whether they could think of something easier.
  
Back to top
 
IP Logged
 
Robert
YaBB Newbies
*
Offline



Posts: 1
Joined: Sep 20th, 2005
Re: Gantt charts using FlowChartX
Reply #3 - Sep 20th, 2005 at 12:47am
Print Post  
As the author of the Gantt Chart, yes, it pretty much does most of what a simple gannt chart would do. Unfortunately we didn't think of a way to make the top bar stay on screen either so it scrolls off when the user scrolls down. To get around it there was a tool tip on the boxes which showed the year. In looking back I agree with Stoyan but would modify his idea to create a single "on-top" box across the top positioned at (0,0) and insert a  generated image with the headings. this would be easier to move (up and down only) as the scroll bars change. Another way would be to create a contained group.
  
Back to top
 
IP Logged
 
TheSmartGuy
YaBB Newbies
*
Offline



Posts: 4
Joined: Aug 7th, 2005
Re: Gantt charts using FlowChartX
Reply #4 - Sep 21st, 2005 at 1:08pm
Print Post  
Thank you for the suggestions gentlemen.

Custom drawing with GDI+ in VB is impossible task for me Embarrassed So now I use a table to draw the header, there is just one row, and each cell in that row represents a week. In addition I set the caption height to 0.

I found that ClientToDocPt function and use it to calculate the Y position where the table is moved in response to flowChart_Scroll. Now my gantt works very much as required.

This control of yours is great!
  
Back to top
 
IP Logged
 
TheSmartGuy
YaBB Newbies
*
Offline



Posts: 4
Joined: Aug 7th, 2005
Re: Gantt charts using FlowChartX
Reply #5 - Sep 21st, 2005 at 1:19pm
Print Post  
A am plain stupid - it turned out I can go without using ClientToDocPt at all. The ScrollY property gives me the exact coordinate where the table should move.
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint