- def Add(self, *args):
- if type(args[0]) == type(1):
- apply(self.AddSpacer, args)
- elif string.find(args[0].this, 'Sizer') != -1:
- apply(self.AddSizer, args)
- else:
- apply(self.AddWindow, args)
-
- def Insert(self, *args):
- if type(args[0]) == type(1):
- apply(self.InsertSpacer, args)
- elif string.find(args[0].this, 'Sizer') != -1:
- apply(self.InsertSizer, args)
- else:
- apply(self.InsertWindow, args)
-
- def Prepend(self, *args):
- if type(args[0]) == type(1):
- apply(self.PrependSpacer, args)
- elif string.find(args[0].this, 'Sizer') != -1:
- apply(self.PrependSizer, args)
- else:
- apply(self.PrependWindow, args)
-
- def Remove(self, *args):
- if type(args[0]) == type(1):
- apply(self.RemovePos, args)
- elif string.find(args[0].this, 'Sizer') != -1:
- apply(self.RemoveSizer, args)
- else:
- apply(self.RemoveWindow, args)
+ def Add(self, item, *args, **kw):
+ if type(item) == type(1):
+ item = (item, args[0]) # backwards compatibility, args are width, height
+ args = args[1:]
+ self._Add(item, *args, **kw)