def __init__(self, name='MenuVBoxWindow'): Window.__init__(self) self.set_name(name) self.vbox = VBox() self.add(self.vbox) self.menubar = SimpleMenuBar() self.vbox.pack_start(self.menubar, FALSE, FALSE, 0) self.vbox.show() self.show()
def __init__(self, name='CommandBox'): VBox.__init__(self) self.set_name(name) self.tbar = HandleToolbar() self.menubar = SimpleMenuBar() self.pack_start(self.menubar, FALSE, FALSE, 0) self.pack_end(self.tbar, FALSE, FALSE, 0) self.show()
def __init__(self, name='MenuVBoxWindow'): Window.__init__(self) self.set_name(name) self.vbox = VBox() self.add(self.vbox) self.menubar = SimpleMenuBar() self.vbox.pack_start(self.menubar, False, False, 0) self.vbox.show() self.show()
class MenuWindowOrig(Window): def __init__(self, name='MenuVBoxWindow'): Window.__init__(self) self.set_name(name) self.vbox = VBox() self.add(self.vbox) self.menubar = SimpleMenuBar() self.vbox.pack_start(self.menubar, False, False, 0) self.vbox.show() self.show() def add_menu(self, commands, name, function, radio=False): if radio: new_menu = RadioMenu(commands, function) else: new_menu = SimpleMenu() for command in commands: new_menu.add(command, function) self.menubar.append(new_menu, name)
class MenuWindowOrig(Window): def __init__(self, name='MenuVBoxWindow'): Window.__init__(self) self.set_name(name) self.vbox = VBox() self.add(self.vbox) self.menubar = SimpleMenuBar() self.vbox.pack_start(self.menubar, FALSE, FALSE, 0) self.vbox.show() self.show() def add_menu(self, commands, name, function, radio=False): if radio: new_menu = RadioMenu(commands, function) else: new_menu = SimpleMenu() for command in commands: new_menu.add(command, function) self.menubar.append(new_menu, name)