Open notatallshaw opened 3 years ago
Try this:
self.ping_label.bind('
def dragWindow(self,event): x = self.winfo_pointerx() - self._offsetx y = self.winfo_pointery() - self._offsety self.geometry('+{x}+{y}'.format(x=x,y=y))
def setOffset(self,event): self._offsetx = event.x self._offsety = event.y
Cool idea, I'll try and look today, I was planning to push a small release that just fixes up some code soon anyway.
btw, you might have noticed some text missing in my comment above:
self.ping_label.bind('Button-1 ... self.ping_label.bind('B1-Motion ...
I think it was probably due to the less & greater than signs ..
Also, in your code, it might be self.root.winfo...
Investigate if it's possible to make the window dragable. If so, record the last position the user dragged it to so that next time it's opened it will be opened in that position.