def initialize(self): self.grid() self.form_connection_parameters(0, 0, 2, None) tkwid.display_label(None, " " * 5, 2, 0, None, None) self.form_database_tables(3, 0, 2, None) self.label_process_status = tkwid.display_label(None, "", 0, 8, 4, None) self.label_process_status[1].config(font="Calibri 10 bold", fg = "#000000") self.grid_columnconfigure(0, weight = 0) self.resizable(True, False) self.butt_update_table = Tkinter.Button(self, text = u"Mettre à jour", anchor = "w", command = self.update_table) self.butt_update_table.grid(column = 4, row = 8)
def form_connection_parameters(self, x, y, xspan, yspan): frame_connparam = tkwid.display_frame("Paramètres de connexion".decode("utf8"), x, y, xspan, yspan) self.label_host = tkwid.display_label(frame_connparam, "Hôte :".decode("utf8"), x, y + 1, None, None) self.label_port = tkwid.display_label(frame_connparam, "Port :", x, y + 2, None, None) self.label_dbname = tkwid.display_label(frame_connparam, "Base de \ndonnées :".decode("utf8"), x, y + 3, None, None) self.label_user = tkwid.display_label(frame_connparam, "Utilisateur :", x, y + 4, None, None) self.label_password = tkwid.display_label(frame_connparam, "Mot de passe :", x, y + 5, None, None) self.entry_host = tkwid.display_entry(frame_connparam, config.host, x + xspan - 1, y + 1, None, None) self.entry_port = tkwid.display_entry(frame_connparam, config.port, x + xspan - 1, y + 2, None, None) self.entry_dbname = tkwid.display_entry(frame_connparam, config.dbname, x + xspan - 1, y + 3, None, None) self.entry_user = tkwid.display_entry(frame_connparam, config.user, x + xspan - 1, y + 4, None, None) self.entry_password = tkwid.display_entry(frame_connparam, config.password, x + xspan - 1, y + 5, None, None) self.entry_password[1].config(show = "*")