In tkinter, python, I'm currently trying to make a program so when a button is clicked a canvas created shape/line/text is hidden/removed. Here's what I've tried:
line = canvas.create_line(...)
line.configure(state=HIDDEN)
this just simply comes up with an error message, so I'd like some help with this. Thanks you for your time :)
- Jake
I apologise for my poor english skills
canvas.delete(line) is the function you're looking for.
I advise you to consult online documentation on Tkinter before asking basic questions on SO. You can take a look at this website or this one for instance.
Related
I have tried everything to try and create the menus shown below, yet I can not figure out how to cascade checkbuttons/checkboxes. I am new to Tkinter so I apologize if this is a stupid question, but I just want to know if the below photo is possible.
Thanks so much.
If this is a repeated question let me know, because I can't find any like it anywhere. Apologies for the low-quality photo!
Desired menu output
Me, being a newbie to both coding and Tkinter, could not figure out what any of the similar posts on this meant nor how to adapt them to my own purposes, nor whether they would work for me at all. So sorry if someone already answered this question, I checked on several sites and this site.
Essentially, I was hoping to be able to create a text scrolling animation on a text widget in Tkinter. For example, if you are confused about what I am talking about, I got the idea from a python game here, check it out to see what I mean: https://repl.it/talk/share/Yellow-Stone-Zombies-An-Apocalypse-Game-300-Cycles-Special/37364
However, I could not use the bit of code that the person who made that game used as it corresponded to the print function, not Tkinter in any way.
Does someone know how to achieve this on a TEXT WIDGET, NOT A CANVAS OR LABEL???
Thank you so much if you do, I have no code to show here because I literally do not know where to start, sorry if there is an obvious solution and I'm just so newbie that I don't see it.
EDIT: The question was answered in the comments.
I am using MATLAB and SIMULINK and there is something missing there that is driving me crazy, but the question is not MATLAB-related.
At a certain point I have a window like that:
I would like to have the SELECT ALL button. I don't know why, but since a lot of years I am asking this feature to MathWorks but they don't implement it.
Anyway, I decided to do a workaround by myself.
I want to make a small script in Python which detect the text 'Tunable' and after it clicks automatically on ALL the checkboxes.
Is it possible to do it in Python ?
I found a solution to my problem.
If you are interested you can look at it in this video:
VIDEO YOUTUBE
I am happy to share ideas and to know your opinion.
Does anybody know if it's possible to press the play button on a music website using Python? What I'm trying to do is make an alarm clock script that plays a random playlist on a music site.
Here and here are similar questions (I think), although I don't know if what I'm using applies to this. I'm trying to use Grooveshark.
The first linked question's answer, to use Selenium, is probably your best bet. You can write your code in Python, and any other way of interfacing with a website as complex as Grooveshark will probably not be easy. There is an API (http://developers.grooveshark.com) but for what you want Selenium is probably the easiest approach.
just use tkinter button widget and use pygame musicplayer, it works very well.
I posted a similar question a while ago but haven't received any answers so i thought i might ask a more generic question:
Does anyone know how to, through any means, output true video, not a rapidly changing sequence of images, in a Tkinter window with python?
You probably need an extension like TkVideo or Quicktime to do that, not sure there is a python style wrapper for it available yet.
https://github.com/patthoyts/tkvideo