views:

504

answers:

2

Hello!

I am looking for a certain wxPython widget to use in my program. I hope that something like this exists and that you might know where to find. I will try to describe the functionality I'm looking for:

Imagine something like the widget that Audacity uses to display an audio track. It's a horizontal timeline, with a ruler. It is possible to zoom in and out, and to scroll, and the ruler updates to reflect where / how deep you are on the timeline. Only a finite segment of the timeline is "occupied", i.e., actually contains data. The rest is empty. It is possible to select with the mouse any time point on the timeline, and, of course, it is possible to let it "play": to traverse the timeline from left to right in a specified speed.

If you know something that's at least close to what I describe, I'd be interested.


If you want to know what the job of this widget is: It's for a program for running simulations. The program calculates the simulation in the background, extending the "occupied" part of the timeline. It is possible to select different points in the timeline to observe the state of the system in a certain timepoint, and of course it is possible to play the simulation.

Thanks!

+1  A: 

A quick web search doesn't yield anything but others hoping for the same thing. My guess is you won't find any nice wx widgets for timelines. The closest you're likely to get is a wxSlider. This is far from ideal, but it'll get you up and running. You can also look at creating a custom widget -- that'd definitely do what you want, but it will be a lot of work. Sorry I don't have anything better, but I figured some answer is better than nothing.

Benson
+1  A: 

I have been working on a timeline widget for use in Task Coach (http://www.taskcoach.org). I haven't released it separately yet, but it is fully isolated from the rest of the Task Coach source code so you should be able to rip it out quite easily. See http://taskcoach.svn.sourceforge.net/viewvc/taskcoach/trunk/taskcoach/taskcoachlib/thirdparty/timeline/

Frank Niessink
Already implemented it myself, thanks though.
cool-RR