CustomTkinter
CustomTkinter copied to clipboard
CTkSlider bind <Button-1> <ButtonRelease-1> <Double-Button-1> possible?
trafficstars
Hello. I'm trying to create custom mouse1 event binds for a CTkSlider but it doesn't seem to be working. I'm simply trying to determine if I'm dragging a slider in the current moment or not.
self.slider.bind("<Button-1>", partial(self.set_dragging, val=True))
self.slider.bind("<ButtonRelease-1>", partial(self.set_dragging, val=False))
...
def set_dragging(self, *args, val=False):
self.slider_clicked= val
if self.slider_clicked:
print("clicked")
else:
print("unclicked")
I noticed the sliders already do respond to mouse clicks so does this mean I can't define my own mouse1 event as well?
I also wanted to set a mouse1 double click and that didn't work either, perhaps its related?
Any help or info would be greatly appreciated.
Thank you for your time.