Time scale along Panel edge

I want to layout a time scale along the edge of a panel, say, the length of the panel is equivalent to 30 seconds, and I want to show tick marks at 1 second intervals, with beginning and end points labelled. Something like you could do with a slider control.

Is there a specific wxWidget that could do this, or do I need to write the code myself in an OnPaint method? Thanks for suggestions.

Best regards,
Tim Grove

Tim Grove wrote:

I want to layout a time scale along the edge of a panel, say, the length of the panel is equivalent to 30 seconds, and I want to show tick marks at 1 second intervals, with beginning and end points labelled. Something like you could do with a slider control.

What else do you want in that panel?

wx.lib.floatcanvas could make this easy, particularly if you want to be able to zoom it, but it depends what else you want there.

-Chris

···

--
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/OR&R (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception

Chris.Barker@noaa.gov

Hi Tim,

···

On Wed, Feb 27, 2008 at 8:38 PM, Tim Grove wrote:

Hi Chris,

Nothing specific at the moment, just a general question to see if there
was anything such as a "ruler widget" somewhere within wxPython that
already did this, that I haven't discovered yet. Thanks for the response!

You might want to take a look at my implementation of RulerCtrl:

http://xoomer.alice.it/infinity77/main/freeware.html#rulerctrl

It might do what you are looking for.

Andrea.

"Imagination Is The Only Weapon In The War Against Reality."
http://xoomer.alice.it/infinity77/

Hi Andrea,

I'm giving your RulerCtrl a try. Can the position of an indicator (and the position of the thin line associated with it) be set programmatically, or only by mouse dragging?

I've also found that when I'm dragging the indicator with the mouse and I move the mouse off of the indicator before I've finished dragging, the line remains drawn on the window. I can end up with several lines drawn this way all over the window! This also seems to happen in the demo as well.

Best regards,
Tim

···

You might want to take a look at my implementation of RulerCtrl:

http://xoomer.alice.it/infinity77/main/freeware.html#rulerctrl

It might do what you are looking for.

Andrea.