This class configures and populates the toplevel window. top is the toplevel containing window.
(self, top=None)
| 52 | |
| 53 | class Notepads_managment: |
| 54 | def __init__(self, top=None): |
| 55 | """This class configures and populates the toplevel window. |
| 56 | top is the toplevel containing window.""" |
| 57 | _bgcolor = "#d9d9d9" # X11 color: 'gray85' |
| 58 | _fgcolor = "#000000" # X11 color: 'black' |
| 59 | _compcolor = "#d9d9d9" # X11 color: 'gray85' |
| 60 | _ana1color = "#d9d9d9" # X11 color: 'gray85' |
| 61 | _ana2color = "#d9d9d9" # X11 color: 'gray85' |
| 62 | self.style = ttk.Style() |
| 63 | if sys.platform == "win32": |
| 64 | self.style.theme_use("winnative") |
| 65 | self.style.configure(".", background=_bgcolor) |
| 66 | self.style.configure(".", foreground=_fgcolor) |
| 67 | self.style.configure(".", font="TkDefaultFont") |
| 68 | self.style.map( |
| 69 | ".", background=[("selected", _compcolor), ("active", _ana2color)] |
| 70 | ) |
| 71 | |
| 72 | top.geometry("600x450") |
| 73 | top.title("Notepads managment") |
| 74 | top.configure(highlightcolor="black") |
| 75 | |
| 76 | self.style.configure("TNotebook.Tab", background=_bgcolor) |
| 77 | self.style.configure("TNotebook.Tab", foreground=_fgcolor) |
| 78 | self.style.map( |
| 79 | "TNotebook.Tab", |
| 80 | background=[("selected", _compcolor), ("active", _ana2color)], |
| 81 | ) |
| 82 | self.TNotebook1 = ttk.Notebook(top) |
| 83 | self.TNotebook1.place(relx=0.02, rely=0.02, relheight=0.85, relwidth=0.97) |
| 84 | self.TNotebook1.configure(width=582) |
| 85 | self.TNotebook1.configure(takefocus="") |
| 86 | self.TNotebook1_t0 = Frame(self.TNotebook1) |
| 87 | self.TNotebook1.add(self.TNotebook1_t0, padding=3) |
| 88 | self.TNotebook1.tab( |
| 89 | 0, |
| 90 | text="Add", |
| 91 | compound="none", |
| 92 | underline="-1", |
| 93 | ) |
| 94 | self.TNotebook1_t1 = Frame(self.TNotebook1) |
| 95 | self.TNotebook1.add(self.TNotebook1_t1, padding=3) |
| 96 | self.TNotebook1.tab( |
| 97 | 1, |
| 98 | text="Display", |
| 99 | compound="none", |
| 100 | underline="-1", |
| 101 | ) |
| 102 | self.TNotebook1_t2 = Frame(self.TNotebook1) |
| 103 | self.TNotebook1.add(self.TNotebook1_t2, padding=3) |
| 104 | self.TNotebook1.tab( |
| 105 | 2, |
| 106 | text="Create", |
| 107 | compound="none", |
| 108 | underline="-1", |
| 109 | ) |
| 110 | |
| 111 | self.inputNotice = Text(self.TNotebook1_t0) |