def __init__(self, master, title='', message='', abortLabel=World.L("ABORT"), saveLabel=World.L("SAVE"), cancelLabel=World.L("CANCEL")): tkinter.Toplevel.__init__(self, master) self._master = master self['bd'] = World.padSize() c = 0 r = 0 messageLabel = Label(self, text=message) messageLabel.grid(row=r, column=c, columnspan=3, padx=World.padSize(), pady=World.padSize()) r += 1 abortButton = Button(self, text=abortLabel, command=lambda: self._answer('ABORT')) abortButton.grid(row=r, column=c, padx=World.smallPadSize(), pady=World.smallPadSize()) c += 1 saveButton = Button(self, text=saveLabel, command=lambda: self._answer('SAVE')) saveButton.grid(row=r, column=c, padx=World.smallPadSize(), pady=World.smallPadSize()) c += 1 cancelButton = Button(self, text=cancelLabel, command=lambda: self._answer('CANCEL')) cancelButton.grid(row=r, column=c, padx=World.smallPadSize(), pady=World.smallPadSize()) self.center() self.resizable(False, False) self.setModal()
def __init__(self, master): tkinter.Toplevel.__init__(self, master) World.LOG().info("Login process started.") self.protocol("WM_DELETE_WINDOW", master._onExit) self['bd'] = World.padSize() c = 0 r = 0 titleLabel = Label(self, text=World.L("LoginDialog.TITLE")) titleLabel.grid(row=r, column=c, columnspan=2, padx=World.padSize(), pady=World.padSize()) r += 1 nameLabel = Label(self, text=World.L("USERNAME")) nameLabel.grid(row=r, column=c, padx=World.smallPadSize(), pady=World.smallPadSize()) c += 1 self._nameEntry = Entry(self) self._nameEntry.grid(row=r, column=c, padx=World.smallPadSize(), pady=World.smallPadSize()) r += 1 c = 0 passwordLabel = Label(self, text=World.L("PASSWORD")) passwordLabel.grid(row=r, column=c, padx=World.smallPadSize(), pady=World.smallPadSize()) c += 1 self._passwordEntry = Entry(self) self._passwordEntry.grid(row=r, column=c, padx=World.smallPadSize(), pady=World.smallPadSize()) r += 1 c = 0 loginButton = Button(self, text=World.L('LOGIN'), command=lambda: master._onSuccessfulLogin(self)) loginButton.grid(row=r, column=c, padx=World.smallPadSize(), pady=World.smallPadSize()) c += 1 exitButton = Button(self, text=World.L('EXIT'), command=master._onExit) exitButton.grid(row=r, column=c, padx=World.smallPadSize(), pady=World.smallPadSize()) self.center() self.resizable(False, False) self.setModal()
def __init__(self, master, person): Toplevel.__init__(self, master) World.LOG().info("PersonDialog opening.") self.title(World.L("PersonDialog.TITLE")) self['bd'] = World.padSize() self.__person = person self.__createWidgets() self.__showItem() self.setModal()
def __init__(self, master, columns=2, rows=1, header=('First header', 'Second header'), type=None): Frame.__init__(self, master, padding=World.padSize()) self.__type = type self.__columnCount = columns self.__data = [] self.__createGrid() self.setHeader(header) self._createControls()
def __init__(self, master, appEntity, entity): Toplevel.__init__(self, master) World.LOG().info("ChooserDialog opening.") self.title(World.L("ChooserDialog.TITLE")) self['bd'] = World.padSize() self.__appEntity = appEntity self.__entity = entity self.__createWidgets() self.__fillListWithElements() self.__showItem() self.setModal()
def __init__(self, master, title='', message='', abortLabel=World.L("ABORT"), saveLabel=World.L("SAVE"), cancelLabel=World.L("CANCEL")): tkinter.Toplevel.__init__(self, master) self._master = master self['bd'] = World.padSize() c = 0 r = 0 messageLabel = Label(self, text=message) messageLabel.grid(row=r, column=c, columnspan=3, padx=World.padSize(), pady=World.padSize()) r += 1 abortButton = Button(self, text=abortLabel, command= lambda:self._answer('ABORT')) abortButton.grid(row=r, column=c, padx=World.smallPadSize(), pady=World.smallPadSize()) c += 1 saveButton = Button(self, text=saveLabel, command= lambda:self._answer('SAVE')) saveButton.grid(row=r, column=c, padx=World.smallPadSize(), pady=World.smallPadSize()) c += 1 cancelButton = Button(self, text=cancelLabel, command= lambda:self._answer('CANCEL')) cancelButton.grid(row=r, column=c, padx=World.smallPadSize(), pady=World.smallPadSize()) self.center() self.resizable(False, False) self.setModal()
def _createLayout(self): self._mainPanedWindow = PanedWindow(orient=HORIZONTAL) self._mainPanedWindow.pack(fill=BOTH, expand=1) self._leftPanel = Canvas(self._mainPanedWindow, background="pink") self._mainPanedWindow.add(self._leftPanel) self.noteBookPanel = Notebook(self._mainPanedWindow) self._mainPanedWindow.add(self.noteBookPanel) buttonFrame = Frame() buttonFrame.pack(side=RIGHT, padx=World.smallPadSize(), pady=World.padSize()) self.exitButton = Button(buttonFrame, text=World.L("MainWindow.EXIT"), command=self._onExit) self.exitButton.pack(fill=BOTH, expand=1, side=LEFT, padx=World.smallPadSize())
def __init__(self, master, appFrame, elementId=0): World().LOG().info("Frame called: " + self._type) Frame.__init__(self, master, padding=World.padSize()) self._myApplication = appFrame self._myElementId = elementId
def __init__(self, master, appFrame, elementId=0): World().LOG().info("Frame called: " + self._type) Frame.__init__(self, master, padding= World.padSize()) self._myApplication = appFrame self._myElementId = elementId