MCPcopy Create free account
hub / github.com/Image-Py/imagepy / add_ctrl_

Method add_ctrl_

imagepy/ui/panelconfig.py:71–80  ·  view source on GitHub ↗
(self, Ctrl, key, p)

Source from the content-addressed store, hash-verified

69 self.add_ctrl_(widgets[para[0]], *para[1:])
70
71 def add_ctrl_(self, Ctrl, key, p):
72 ctrl = Ctrl(self, *p)
73 if not p[0] is None:
74 self.ctrl_dic[key] = ctrl
75 if hasattr(ctrl, 'Bind'):
76 ctrl.Bind(None, self.para_changed)
77 pre = ctrl.prefix if hasattr(ctrl, 'prefix') else None
78 post = ctrl.postfix if hasattr(ctrl, 'postfix') else None
79 self.tus.append((pre, post))
80 self.lst.Add( ctrl, 0, wx.EXPAND, 0 )
81
82 def pack(self):
83 self.Layout()

Callers 2

init_viewMethod · 0.95
parseMethod · 0.95

Calls 2

appendMethod · 0.80
BindMethod · 0.45

Tested by

no test coverage detected