Código:
no se porque pasa si esta bien definida o ¿no?Traceback (most recent call last): File "C:\Users\oscars\Documents\NetBeansProjects\PythonProjectIDE\src\Ribbon.py", line 862, in OnMouseMotion nPos = (self.wdPos.x + (dPos.x - self.ldPos.x),self.wdPos.y + (dPos.y - self.ldPos.y)) AttributeError: 'Ribbon' object has no attribute 'wdPos'
Código python:
Ver original
def OnMouseLeftDown(self, event): self.Refresh() self.wdPos = self.ClientToScreen((0, 0)) self.ldPos = event.GetEventObject().ClientToScreen(event.GetPosition()) self.CaptureMouse() def OnMouseMotion(self, event): if event.Dragging() and event.LeftIsDown(): dPos = event.GetEventObject().ClientToScreen(event.GetPosition()) nPos = (self.wdPos.x + (dPos.x - self.ldPos.x),self.wdPos.y + (dPos.y - self.ldPos.y)) self.Move(nPos) def OnMouseLeftUp(self, event): self.ReleaseMouse()