Skip to content

Tag: tkinter

Tkinter scrollbar for frame

My objective is to add a vertical scroll bar to a frame which has several labels in it. The scroll bar should automatically enabled as soon as the labels inside the frame exceed the height of the frame. After searching through, I found this useful post. Based on that post I understand that in order to achieve…

Python Tkinter multiple selection Listbox

I have a listbox which is setup with selection=’multiple’. I then try to obtain a list of all the options the user has selected, by the code name.get(ACTIVE). the problem is that it doesn’t not always get all the options I have highlighted in the listbox GUI. If I highlight one, it brings th…

python tkinter with threading causing crash

I have written a python tkinter code using threads so as the tkinter wizard updates automatically by tkinter mainloop running in the main thread and background process running in separate thread. But I noticed, that python crashes after some time when running the code. Moreover its random in nature but python…

Opening and reading a file with askopenfilename

I have the following code where I’m trying to allow the user to open a text file and once the user has selected it, I would like the code to read it (this isn’t a finished block of code, just to show what I’m after). However, I’m having difficulties either using tkFileDialog.askopenfil…

Parsing the results of askopenfilenames()?

I’m trying to get a list of filenames from tkinter.filedialog.askopenfilenames() in Python 3.2. I was expecting the output to be a tuple (or maybe a list) with each element containing a filename. As far as I can tell, it’s returning a string with each element contained within curly-brackets {} lik…