Python Forum

Full Version: Get the marker that the time marker is currently colliding with
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi guys,
I am making an app with ttkwidgets timeline and I need to know what marker the time marker is hovering over so I can run my functions accordingly. I have looked thoroughly through the library code and have not seen a function for this. Please can you help?
Thanks in advance! Smile
You need to create a callback which shows movement of the cursor, and keep that up to date.
the callback is set up in tag_configure.
See the documentation here: https://ttkwidgets.readthedocs.io/en/sph...eLine.html
also note the tiny 'source' button. Looking at the source, shows detailed attribute documentation.

Quote::param move_callback: Callback to be called upon moving a
marker. Arguments to callback:
(iid: str, (old_start: float, old_finish: float),
(new_start: float, new_finish: float))
So do I get the position of the cursor and transfer that into a time?
I have looked at the docs and there is 3 callbacks for tag_configure, move_callback, right_callback and left_callback. I don't see a callback for when it is being hovered over by the time marker.
Not sure then, I'll see if I can find an example later today. I think (It's been a while, as I now use wxpython) I've done this before.
ok! thanks!
i've solved the problem! thanks!
Please share solution