I’m trying to make a small app in Tkinter and i want to insert a notebook after an connexion inside my main window.
but i dont find how i can make to set the notebook’s size to fit full widht and height of the window.
Here my code
`import tkinter as tk
import ttkbootstrap as ttk
from ttkbootstrap.constants import *
class MainApp(tk.Tk):
def init(self):
tk.Tk.init(self)
#on définit le titre de la page
self.title(“Youtube Manager”)
self.state(“zoomed”)
# self.grid_columnconfigure(0,weight=1)
self.login = ttk.Label(bootstyle="primary",text="Login :")
self.login_input = ttk.Entry(bootstyle="primary",width=30)
self.pwd = ttk.Label(bootstyle="primary",text="Mot de passe :")
self.pwd_input = ttk.Entry(bootstyle="primary",width=30)
self.btn_connect = ttk.Button(bootstyle="success",text="Connexion")
self.separator = ttk.Separator(bootstyle="primary",orient="horizontal")
#on place les widget
self.login.grid(row=0,column=0,padx=2,pady=1)
self.login_input.grid(row=0,column=1,padx=2)
self.pwd.grid(row=0,column=2,padx=2,pady=1)
self.pwd_input.grid(row=0,column=3,padx=2,pady=10)
self.btn_connect.grid(row=0,column=4,columnspan=2,padx=2)
self.notebook = ttk.Notebook(self,bootstyle="primary")
self.notebook.grid(row=1,column=1,sticky='NSWE',rowspan=5,columnspan=50)`
Result
expected
JUL Ben is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.