Skip to content
Advertisement

Tag: tkinter

Takes 1 positional argument but 2 were given Python Tkinter

I am working on one feature of my software which takes keyboard which I have bind to the window like this win.bind(‘<Key>’, self.triggerBackButton). And here is the callback funtion. Logic of above function goes something like this. It takes self and event as input, where event holds the information like from where it was triggered, which button triggered it etc.

How to insert scrollbar into canvas filled with buttons?

I’m trying to insert a scrollbar into a canvas filled with buttons (where, buttons can be switched to clickable text as well). With the code below, the window seems OK. However, when I uncomment the lines with the scrollbar, the window geometry scrambles. Can anybody give a hand to figure out what’s wrong with the code? System: Windows 10, python

How to change color of matplotlib toolbar in tkinter?

I would like to change the color of the toolbar when making a matplotlib figure in tkinter. I have managed to find and change the color of two parts. There is one remaining. My code comes directly from https://matplotlib.org/stable/gallery/user_interfaces/embedding_in_tk_sgskip.html?highlight=embedding%20tk with three additional lines to change colors. This gives me the window: What is the small, grey rectangle I have pointed

Tkinter: How to swich label text using buttons

I want to change the label text to the buttonĀ“s name when I press it. there are undefined buttons so I can’t save each one to a variable. Answer You have many errors. Here is a version of your code, for Python 3, not Python 2, that at least runs. It may not do exactly what you want it to

Trying to resize image on 2nd window of Tkinter GUI

This code will open a main window with an image, then another window with the same image. Is there any way to resize the image to be smaller? (go to # !>>> IMAGE 2 (2nd window)) Here is the code: Answer I see Bryan Oakley has already posted an answer your question, but I’ll supplement it with my own, which

Advertisement