Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to create a timeline control? [closed]

Tags:

c#

winforms

I want to create (or download, but I can't find any) a timeline control. What I have in mind is something like this:

screenshot

In this image I am only interested in the timetable, with the resource on the left and the time horizontal.

Does anyone can tell me what a good way is to develop such control? I have tried the tablelayout control, but I am stuck now, because I can't plan something that takes 2 minutes. I also don't want to draw a column for every minute because of the performance and it looks too busy.

like image 731
Martijn Avatar asked Jan 01 '12 13:01

Martijn


1 Answers

Telerik and DevExpress are great about these kinds of stuffs but since they're not free, using them should be hard for us poor people :).

I can call this project as a prototype because it needs a lot of work to get fitted in the place that you want. http://www.4shared.com/zip/cGKq8yLt/Timeline.html

Any question will be getting answered if I would be on the Stack.

EDIT

For scrolling it's better to not use a scroll control because it would make the work harder. Add two buttons, one for moving to 1 hour ago and the other one for moving to next 1 hour. You can change the factor 1 for moving in large steps. Then in the Paint event at the part of Draw items you should calculate what's the view port of current visible times. It might be a little hard.

UPDATE

I've seen people coming here more than what I was expecting and since I've removed previous source from here, today I wrote a much better timeline control to put for download for others. You can get it from the above link which I've renewed it. The good thing about this new version is that you can give times like this: 9:15 or 10:48. But, since the grid is snapped in hours and half hours, it'll go outside of lines.

This is an image from source:

enter image description here

like image 164
MahanGM Avatar answered Oct 20 '22 23:10

MahanGM