(self, Ctrl, key, p)
| 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() |