Skip to content
Advertisement

Tag: tkinter

Is there a way to resize the Combobox entry size?

I know there are many ways to change the drop down list/list box font, my question is how could you adjust the entry field at the same time, the part circled in red. How do I make it the same size as the label next to it? In other word, how do i make the drop down arrow bigger? Answer

Make Tkinter Notebook draggable

A similar question was asked back in ’15 Make Tkinter Notebook be Draggable to Another View but that was a while ago and that also asked about re-binding the window. I was wondering how I would make a notebook draggable, even if is just to reorder the tabs. Any advice would be helpful and please let me know if this

have a pre-loaded directory when using tkinter.filedialog.askdirectory()

I have the following code: imports: main: This creates a gui window that prompts the user to enter a directory, with the text Output dir and then an open entry window with a Browse button to load the directory The following is get_ouput_directory() function: The idea is: First time user runs this, the entry window is empty and the user

How to get() a widget’s IntVariable value from the widget?

I am trying to get the value of a Tkinter.Checkbutton’s variable using .get(), but I get an error. I tried plenty of combinations of everything I’ve seen all over stackoverflow and other tutorial sites. The error I get is: It should be an IntVar, not a _tkinter.Tcl_Obj object, which doesn’t have a get attribute, when I try, it raises an

Automated cross stich pattern

I’m trying to create a cross stitch pattern with python as shown in the attached image. So far I simply have the pixilated image. I could import it in excel and manually add the grid and colors etc. But how can I ‘easily’ automate this in python? Can I use any of the normal figure plotting functions (pyplot), or should

Tkinter quit freezes

I have written a very simple snippet of code just to try tkinter: The above code causes the window to freeze. Could someone explain to me what is the reason behind this behaviour? Answer Seperating the pack() from the initialisation lines will fix your issue.

Cant exit fullscreen on tkinter window python

Im trying to make this window fullscreen, then be able to escape with any key. I can’t bind the escape key to actually escaping the window, can’t figure out where it’s going wrong from other similar posts too. Here is the code: Answer On some systems (like Linux) root.overrideredirect(True) removes window manages (WM) which display border but WM also sends

Tkinter with or without OOP

Studying Tkinter and I’ve only found tutorials on Tkinter without OOP, but looking at the Python.org documentation it looks like it’s all in OOP. What’s the benefit of using classes? It seems like more work and the syntax looks night and day from what I’ve learned so far. Answer This is going to be a really generic answer and most

Advertisement