def OnListCommand(self, id, code): if code==win32con.LBN_SELCHANGE: style = self.GetSelectedStyle() self.UpdateUIForStyle(style) return 1