Need advice on how to go about coding a timeline

fatron

Member
Joined
May 13, 2010
Messages
18
Programming Experience
1-3
I'm working on a project where I need a timeline similar to what you would see within a video editing program. Picture of my timeline - http://imgur.com/uztYE.png

So far, I've designed the timeline using nested pictureboxes. The main area of the timeline is a picturebox, and each track (marker and test) are children pictureboxes contained within the first. The marker dots are custom controls that are children of the marker picturebox. The idea will be for the slider to control zooming of the information in the timeline and the scrollbar to control panning of the timeline. Live data will be added to the timeline. This live data will include the marker dots and painting on the bitmap contained within the test picturebox.

I've got portions of the timeline functioning, but I'm stuck on how I should go about panning and zooming. I would like the timeline to update every second and advance the blue bar by 1 pixel every second. The problem starts when the blue line reaches the end of the timeline. Once the blue line reaches the end, I want everything on the timeline to start scrolling off the left side. What would be the best way to go about doing this and still be able to maintain the data written to the timeline? This could be a lot of data if the program runs for several hours.
 
I would consider a RichTextBox it has great zooming, and can hold a lot of data. For scrolling the object left just place all of them in a panel with no borders and backcolor set to transparent - then at the end of the timeline start a timer that with each tick event moves the panel's left property -1 and it will disappear off the left side.
 
Back
Top