Tkinter button not working geometry error

Unkown User

I'm learning tkinter and trying to make a button but when I run my code an error comes up saying

.TclError: cannot use geometry manager grid inside . which already has slaves managed by pack

This is my code:

import tkinter
from tkinter import Button
window=tkinter.Tk()
#title
window.title("Elvoria")
#text
label=tkinter.Label(window, text = "Welcome To Elovria").pack()
#button
bt = Button(window,text="Start")
bt.grid(column=1,row=1)
window.mainloop()
new_to_code

You have to use only grid or pack so change the label placement to grid

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

Why Button is not working in tkinter, when i click it it shows an error

Button not showing up in Tkinter, even w/ geometry manager

tkinter geometry giving resize error even giving the right syntax

Button to clear Treeview table in Tkinter not working?

Tkinter mouse pointer not working for hovering over button

Matplotlib save button not working in embedded Tkinter window

tkinter button created in loop command not working

Tkinter button background color is not working in mac os

Tkinter Geometry Return to Normal

Python tkinter canvas geometry

Bad geometry specifier in Tkinter

Python Tkinter - for loop counter increment button error

"File not found" Error in a command from tkinter Button

Tkinter Button will not create due to error in function

error when changing a Tkinter button command method

Rasterize Geometry Example not working

Imagemagick command geometry not working

Running Two Functions on one tkinter button, Getting a tkinter callback error

Tkinter Grid Geometry Resizing issue

Tkinter pack() geometry manager confusion

Tkinter problem with geometry of composite frame

tkinter frame has no geometry python tkinter

Tkinter button highlight feature stops working after command is called

Tkinter button activates when Program Runs - Lambda not working

How to add a image to a button//Tkinter//Other answers not working

Why is command attribute of button widget not working as expected in Tkinter?

'Error inflating class Button' despite working before

Raster geometry sphere not working as expected

Set tkinter widget with place geometry on top of grid geometry