Quantcast
Channel: Active questions tagged python - Stack Overflow
Viewing all articles
Browse latest Browse all 13951

How to pack two buttons of the same kind?

$
0
0

I'm working on a simple contact list application, and I want that Tkinter places a button for every contact made.This is the code I've made:

from tkinter import *main = Tk()main.title("Contacts +")main.geometry('420x300')main.resizable(0,0)contact_button = Button(text="NameExample")contact_button.pack()contact_button.pack()main.mainloop()

I expected that Tkinter displays two buttons of the same kind, but he instead just shows one button.Is there a way to resolve this problem?


Viewing all articles
Browse latest Browse all 13951

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>