Get the marker that the time marker is currently colliding with - Printable Version +- Python Forum (https://python-forum.io) +-- Forum: Python Coding (https://python-forum.io/forum-7.html) +--- Forum: GUI (https://python-forum.io/forum-10.html) +--- Thread: Get the marker that the time marker is currently colliding with (/thread-35818.html) |
Get the marker that the time marker is currently colliding with - chesschaser - Dec-18-2021 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! RE: Get the marker that the time marker is currently colliding with - Larz60+ - Dec-19-2021 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/sphinx_doc/ttkwidgets/ttkwidgets/ttkwidgets.TimeLine.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 RE: Get the marker that the time marker is currently colliding with - chesschaser - Dec-19-2021 So do I get the position of the cursor and transfer that into a time? RE: Get the marker that the time marker is currently colliding with - chesschaser - Dec-19-2021 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. RE: Get the marker that the time marker is currently colliding with - Larz60+ - Dec-19-2021 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. RE: Get the marker that the time marker is currently colliding with - chesschaser - Dec-20-2021 ok! thanks! RE: Get the marker that the time marker is currently colliding with - chesschaser - Dec-22-2021 i've solved the problem! thanks! RE: Get the marker that the time marker is currently colliding with - Larz60+ - Dec-22-2021 Please share solution |