tkinter-canvas

How to add levels in a game built in python onely with TKINTER? [closed]

ぃ、小莉子 提交于 2021-02-16 21:25:58
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed yesterday . Improve this question I'm working on a memory game that you have to find the position of the red ball,once you move your ball, the red one disappeare, so in order to get more points you had to move as fast as you can, my problem is how to add more levels, for example Level 1 : find

How to add levels in a game built in python onely with TKINTER? [closed]

£可爱£侵袭症+ 提交于 2021-02-16 21:24:57
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed yesterday . Improve this question I'm working on a memory game that you have to find the position of the red ball,once you move your ball, the red one disappeare, so in order to get more points you had to move as fast as you can, my problem is how to add more levels, for example Level 1 : find

Building a spider-chart with turtle or tkinter

♀尐吖头ヾ 提交于 2021-02-11 15:13:46
问题 I recently did 2 beginner courses in python coding at university for my Minor, which were followed by an intro to databases and a basic course about CRUD development in PHP. The python course was decent enough and touched on most of the basics. I've been trying to teach myself by making small applications to do things that I have to do for my remaining courses in linguistics. Now I wanted to write a small python application and that takes user input to create a Language profile for that

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

陌路散爱 提交于 2021-02-11 12:33:36
问题 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 way to display this whole image? increase, or get around the canvas limit? See the example image below. 回答1: There is no way around the size limit of the canvas, short of modifying and recompiling the underlying tk code. This would likely not be a

Clearing and plotting mathplot figure on tkinter

风格不统一 提交于 2021-02-10 12:58:00
问题 I need some help for my current code. I want to create a window by tkinter and show a plot in a canvas I created by matplotlib before. This point I reached yet. My problem is that I want to clear this canvas by hitting a button. To clear a canvas I suppose to initialize this before I can fill it with the plot. So my question is: How can I fill a plot in a created canvas? Below you can find a small code that shows my state of arts. from matplotlib.figure import Figure from matplotlib.backends

Clearing and plotting mathplot figure on tkinter

半世苍凉 提交于 2021-02-10 12:57:16
问题 I need some help for my current code. I want to create a window by tkinter and show a plot in a canvas I created by matplotlib before. This point I reached yet. My problem is that I want to clear this canvas by hitting a button. To clear a canvas I suppose to initialize this before I can fill it with the plot. So my question is: How can I fill a plot in a created canvas? Below you can find a small code that shows my state of arts. from matplotlib.figure import Figure from matplotlib.backends

Clearing and plotting mathplot figure on tkinter

為{幸葍}努か 提交于 2021-02-10 12:57:04
问题 I need some help for my current code. I want to create a window by tkinter and show a plot in a canvas I created by matplotlib before. This point I reached yet. My problem is that I want to clear this canvas by hitting a button. To clear a canvas I suppose to initialize this before I can fill it with the plot. So my question is: How can I fill a plot in a created canvas? Below you can find a small code that shows my state of arts. from matplotlib.figure import Figure from matplotlib.backends

Drawing a png image on a tkinter canvas python

与世无争的帅哥 提交于 2021-02-09 10:58:30
问题 I am trying to create a simple game using tkinter in python 3.5 using the canvas widget. For this game I am need to be able to use a transparent (png) image. Here is my code: from PIL import ImageTk from tkinter import Tk, Canvas root = Tk() im = ImageTk.PhotoImage(file="test.png") canvas = Canvas(root, width=900, height=900) canvas.pack() canvasImage = canvas.create_image(0, 0, image=im, anchor="nw") root.mainloop() The problem is that, despite getting no errors i can't load an image with a

Drawing a png image on a tkinter canvas python

白昼怎懂夜的黑 提交于 2021-02-09 10:58:13
问题 I am trying to create a simple game using tkinter in python 3.5 using the canvas widget. For this game I am need to be able to use a transparent (png) image. Here is my code: from PIL import ImageTk from tkinter import Tk, Canvas root = Tk() im = ImageTk.PhotoImage(file="test.png") canvas = Canvas(root, width=900, height=900) canvas.pack() canvasImage = canvas.create_image(0, 0, image=im, anchor="nw") root.mainloop() The problem is that, despite getting no errors i can't load an image with a

How to add 2 scrollbars with tkinter in python 3.4?

女生的网名这么多〃 提交于 2021-02-08 10:33:02
问题 I have the following code: from win32com.client import Dispatch from tkinter import * from tkinter import ttk import tkinter class applicazione: def __init__(self, root): self.root = root self.root.title('Controllo dati per fatturazione elettronica - Manticle - Smith & Nephew Italia') ttk.Frame(self.root, width=300, height=250).pack() #### label list self.titoli = list() self.titoli_BFT = ["Num_Doc", "Cod_Art", "Unita Misura", "Tot_Prod", "Quant_Prod", "Perc_IVA_Prod", "Tot_IVA_Prod", "Linea