ID_NEW.MENU_ITEM,
ID_NEW.SEPARATOR ],
False)
- if state == STATE_STDDLGBTN:
+ elif state == STATE_STDDLGBTN:
pass # nothing can be added from toolbar
elif state == STATE_MENUBAR:
self.EnableGroup(GROUP_MENUS)
False)
self.EnableGroup(GROUP_SIZERS)
self.EnableGroup(GROUP_CONTROLS)
- # Special case for notebook (always executed)
+ # Special case for *book (always executed)
if state == STATE_ELSE:
- if xxx.__class__ == xxxNotebook:
+ if xxx.__class__ in [xxxNotebook, xxxChoicebook, xxxListbook]:
self.EnableGroup(GROUP_SIZERS, False)
else:
self.EnableGroup(GROUP_SIZERS)
if not (xxx.isSizer or xxx.parent and xxx.parent.isSizer):
self.EnableGroupItem(GROUP_SIZERS, ID_NEW.SPACER, False)
+ if xxx.__class__ == xxxFrame:
+ self.EnableGroupItem(GROUP_MENUS, ID_NEW.MENU_BAR)
# Save state
self.state = state