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

Method setup

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

Source from the content-addressed store, hash-verified

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

Callers 1

on_pane_selectionMethod · 0.45

Calls 3

update_positionMethod · 0.95
remove_childMethod · 0.45
appendMethod · 0.45

Tested by

no test coverage detected