Python Forum
Get the marker that the time marker is currently colliding with
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Get the marker that the time marker is currently colliding with
#1
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
Reply
#2
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))
Reply
#3
So do I get the position of the cursor and transfer that into a time?
Reply
#4
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.
Reply
#5
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.
Reply
#6
ok! thanks!
Reply
#7
i've solved the problem! thanks!
Reply
#8
Please share solution
Reply


Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020