(self, refWidget, newParent)
| 116 | self.origin_y = -1 |
| 117 | |
| 118 | def setup(self, refWidget, newParent): |
| 119 | #refWidget is the target widget that will be resized |
| 120 | #newParent is the container |
| 121 | if self.parent: |
| 122 | try: |
| 123 | self.parent.remove_child(self) |
| 124 | except Exception: |
| 125 | #there was no ResizeHelper placed |
| 126 | pass |
| 127 | if newParent==None: |
| 128 | return |
| 129 | self.parent = newParent |
| 130 | self.refWidget = refWidget |
| 131 | try: |
| 132 | self.parent.append(self) |
| 133 | except Exception: |
| 134 | #the selected widget's parent can't contain a ResizeHelper |
| 135 | pass |
| 136 | #self.refWidget.style['position'] = 'relative' |
| 137 | self.update_position() |
| 138 | |
| 139 | def start_drag(self, emitter, x, y): |
| 140 | self.active = True |
no test coverage detected