How to fit Tkinter listbox to contents
I am writing a program to run batch files for various servers and so far everything is going fine. I mean the programs works and uses a simple GUI and all is well. Apart from when I give it a slightly longer name to display in the listbox it clips the end off. The code that Tkinter uses is below. master = tk.Tk() listbox = tk.Listbox(master, selectmode=tk.SINGLE) keys = serverDict.keys() for key in sorted(keys): listbox.insert(tk.END, key) button = tk.Button(master, text="Execute", command=execute) listbox.pack() button.pack() tk.mainloop() So basically it all works perfectly fine, I'm not