Questions tagged [tkinter-canvas]

The Canvas widget provides structured graphics facilities for Tkinter. This is a highly versatile widget which can be used to draw graphs and plots, create graphics editors, and implement various kinds of custom widgets.

The Canvas widget provides structured graphics facilities for Tkinter. This is a highly versatile widget which can be used to draw graphs and plots, create graphics editors, and implement various kinds of custom widgets.

The canvas is a general purpose widget, which is typically used to display and edit graphs and other drawings.

Another common use for this widget is to implement various kinds of custom widgets. For example, you can use a canvas as a completion bar, by drawing and updating a rectangle on the canvas.

The Canvas is the only scrollable widget in Tkinter. This is useful for more complicated GUIs where there may not be enough space for all the widgets.

Source

1963 questions
0
votes
2 answers

Where can I find tkinter documentation?

When I look at the tkinter page for Python, it does not have any clear descriptions of what parameters functions take and what functionality can be expected for a particular function. For example, I am looking for information about the tkinter…
Pro Q
  • 4,391
  • 4
  • 43
  • 92
0
votes
1 answer

size responsive widgets in a tkinter canvas

When I configure a tkinter window's rows and columns with weight=1 and then place a canvas over it spanning all the rows and the columns ,the canvas becomes size responsive: win=Tk() win.geometry("1200x675") rows=0 while rows<200: …
parag goyal
  • 23
  • 1
  • 8
0
votes
1 answer

How do I "flash" a square in python using tkinter?

So I'm coding this game called simon says which is this classic colour memory game. The algorithm is obviously not done yet, but I just don't know how I can get the square to flash. I'm just testing it with the only the blue square. from tkinter…
0
votes
0 answers

Interference between the Matplotlib Graphs in Tkinter GUI

I learned how to embed a matploblib graph into a Tkinter GUI via this post https://matplotlib.org/examples/user_interfaces/embedding_in_tk.html. It seems working fine. However, I had a problem with getting multiple matplotlib graphs to work…
Chenyang
  • 161
  • 1
  • 11
0
votes
1 answer

Create field to accept mouse drawings and convert it to an image

I want to create a field in python that will accept mouse drawings and convert it into 28x28 pixels image: I want to use this image result to predict the output using a model that i have already trained, the model is of hand writing recognition…
0
votes
0 answers

Creating animation of lines in Python

I have implemented the following code for creating an animation consisting of lines with tkinter (df is just a Pandas dataframe). The problem is that I just see the result but somehow the sleep is not executed (that means there is no animation of…
machinery
  • 5,972
  • 12
  • 67
  • 118
0
votes
1 answer

Difference Between 'ID' and 'tag' with Tkinter objects

I'm trying to create a game in Python tkinter that involves a rocket ship and some asteroids. The problem is, the rocket ship is made up of multiple shapes. I don't need advice on how to simplify the rocket's shape, but if I could get pointers on…
0
votes
1 answer

Tkinter - Using multiple key-binds

I've made a program which draws an oval on click (mouse click=start point, mouse release= end point) as shown in code below, and I'd like to add if condition: when the shift key is pressed midst drawing, it would equalize the coordinates and…
TheOne
  • 330
  • 7
  • 25
0
votes
2 answers

can't delete a canvas item from array, using object tag (string)

I can't delete a canvas item from array, using object tag (string) from Tkinter import * if __name__=="__main__": root=Tk() cv=Canvas(root,bg="yellow",width=200,height=200) cv.pack() wCell=100 N=2 for col in range(N): …
G. Kalman
  • 21
  • 2
0
votes
0 answers

I want to add entry boxes in the frame f1b, which in turn is placed on a canvas c1 (sorry not able to embed image under the postb

I want to add entry boxes in the frame f1b, which in turn is places on a canvas c1. When I add entries to frame f1b directly, frame is not visible. Or should I add them to canvas using create_window? Could someone please help me here.. from…
0
votes
0 answers

Python tkinter - scrollbar of canvas cuts off frame content

I am currently writing a simple logbook application for my sailing holidays. Therefore I wanted to create a small gui for entering data in lines for the logbook. I am using grid layout with frames and canvas for the main frame, to show a scroll…
Gernot
  • 23
  • 3
0
votes
1 answer

Multiple Images in a Tkinter canvas

I am having issue with this code. Actually, 1. Download the images using url 2. Save those images to in a server 3. Display them in a canvas The problem I am having is it's showing only the last image (in this case img2 from url2) from the list,…
vas
  • 53
  • 2
  • 8
0
votes
1 answer

How to drag object on canvas by its corner? And how to separate objects once above each other?

I am trying to create a simple program where you can move multiple objects on canvas in tkinter by dragging them. For beginning, I started with 2 squares. However, I am facing 2 problems: anytime I click on object it gets centred to mouse pointer…
Blacho
  • 87
  • 1
  • 1
  • 8
0
votes
1 answer

tkinter: Created image doesn't appear

I am working on creating a card game in python. I would like to create a function which displays a picture in a tkinter window, but no image appears. I have all the picture files in the right place. Here is my code: from tkinter import* root =…
0
votes
2 answers

How do I display an extremly long image in Tkinter? (how to get around canvas max limit)

I've tried multiple ways of displaying large images with tkinterreally long image No matter what I've tried, there doesn't seem to be any code that works. The main issue is that Canvas has a maximum height limit of around 30,000 pixels. Is there a…
GEOJOE
  • 41
  • 7
1 2 3
99
100