def create_window(self): # Toplevel means that if the GP window will be closed the project page will be closed to. window = Toplevel(self.__gp_root) self.__project_root = window window.iconbitmap('GP_logo.ico') window.geometry('1200x800') window.resizable(width=False, height=False) window.title_font = tkfont.Font(family=HELVETICA, size=18, weight=BOLD) window.cretiria_font = tkfont.Font(family=FIXEDSYS, size=10) self.menuBar() self.present_project_directories() Label(window, text=get_project_name(self.__project), font=window.title_font).pack() self.__chatText = tktext.ScrolledText(master=window, wrap=WORD, state=DISABLED, width=45, height=40) self.__chatText.place(x=700, y=50) self.__chatEntry = Entry(window, width=60) self.__chatEntry.place(x=700, y=720) self.__users_list = Listbox(self.__project_root, width=15, height=40, selectmode=SINGLE) self.__users_list.place(x=1070, y=50) self.users_list() self.__users_list.bind('<Double-1>', self.open_profile_pages) self.chat_history() self.__chatEntry.bind('<Return>', self.send_messages) GetMessages(self.__client_socket, self.__chatText, self.__project, self).start() self.__project_root.protocol("WM_DELETE_WINDOW", self.close_project_page)
def create_window(self): window = Toplevel(self.__project_root) self.__profile_root = window window.iconbitmap('GP_logo.ico') window.geometry('400x400') window.resizable(width=False, height=False) window.title_font = tkfont.Font(family=HELVETICA, size=20, weight=BOLD) window.cretiria_font = tkfont.Font(family=FIXEDSYS, size=10) if self.__user_profile == self.__user: Label(window, text="My Profile\n\n", font=window.title_font).pack() else: Label(window, text=get_user_name(self.__user_profile) + "'s Profile\n\n", font=window.title_font).pack() Label(window, text="first name: " + get_user_firstname(self.__user) + "\n", font=window.cretiria_font).pack() Label(window, text="last name: " + get_user_lastname(self.__user) + "\n", font=window.cretiria_font).pack() Label(window, text="email: " + get_user_email(self.__user) + "\n", font=window.cretiria_font).pack() Label(window, text="phone: " + get_user_phone(self.__user) + "\n", font=window.cretiria_font).pack() self.__profile_root.protocol("WM_DELETE_WINDOW", self.close_profile_page)