Test of the gui
This commit is contained in:
parent
dd6f3f189c
commit
b49002774a
29
gui.py
Normal file
29
gui.py
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
from tkinter import ttk
|
||||||
|
from tkinter import Tk
|
||||||
|
from tkinter import Button
|
||||||
|
|
||||||
|
|
||||||
|
class Gui(Tk):
|
||||||
|
def __init__(self, parent=None) -> None:
|
||||||
|
Tk.__init__(self, parent)
|
||||||
|
self.title("Welcome to LikeGeeks app")
|
||||||
|
self.geometry("300x200+10+20")
|
||||||
|
self.overrideredirect(1) # remove border
|
||||||
|
# window.withdraw() # hide window
|
||||||
|
self.attributes('-topmost', True) # always on top
|
||||||
|
self.tab_control = ttk.Notebook(self)
|
||||||
|
self.tab_control.pack(expand=1, fill='both')
|
||||||
|
self.add_tab(1)
|
||||||
|
self.add_tab(2)
|
||||||
|
self.add_tab(3)
|
||||||
|
|
||||||
|
def add_tab(self, number: int) -> None:
|
||||||
|
tab = ttk.Frame(self.tab_control)
|
||||||
|
Button(tab, text='Accept').pack()
|
||||||
|
Button(tab, text='Decline').pack()
|
||||||
|
self.tab_control.add(tab, text=f'{number}')
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
app = Gui()
|
||||||
|
app.mainloop()
|
Loading…
x
Reference in New Issue
Block a user