MCPcopy Index your code
hub / github.com/rawpython/remi / setup

Method setup

examples/resizable_panes.py:43–62  ·  view source on GitHub ↗
(self, refWidget, newParent)

Source from the content-addressed store, hash-verified

41 self.origin_y = -1
42
43 def setup(self, refWidget, newParent):
44 #refWidget is the target widget that will be resized
45 #newParent is the container
46 if self.parent:
47 try:
48 self.parent.remove_child(self)
49 except Exception:
50 #there was no ResizeHelper placed
51 pass
52 if newParent==None:
53 return
54 self.parent = newParent
55 self.refWidget = refWidget
56 try:
57 self.parent.append(self)
58 except Exception:
59 #the selected widget's parent can't contain a ResizeHelper
60 pass
61 #self.refWidget.style['position'] = 'relative'
62 self.update_position()
63
64 def start_drag(self, emitter, x, y):
65 self.active = True

Callers

nothing calls this directly

Calls 3

update_positionMethod · 0.95
remove_childMethod · 0.45
appendMethod · 0.45

Tested by

no test coverage detected