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.
Related
I know that this might sound weird, but I have a problem considering the screen resolution of my Tkinter program. I have attached two pictures for a comparison.
I think you can clearly tell, what I'm talking about. The problem is that I don't really know why this happened. Suddenly the tkinter window had a way better resolution as you can see in the top picture. I did not change anything related to screensize/resolution by myself and was therefore expecting Tkinter to have published an update which just has better textures for every widget.
But because I had to reinstall python and all its modules this is no longer the case and the widgets look very blurry again (Bottom picture). Now I'm asking myself whether this has something to do with another version of Python or tkinter I'm using or what else could have been the reason for that.
I did not change my PC, Screen or anything like that. I just reinstalled python and its modules. Sadly I don't have the source code of the version where it looked great, but only an .exe file, because im continuously updating my program. But as I said before, I don't know what I could have changed which led to this huge resolution improvement.
I hope you get, what I'm trying to tell you.
Thanks in advance!
I was able so solve it!
I had a look on this question: on Stackoverflow
The answer from #binaryfunt solved my problem completely. So it was not really a tkinter/python thing, but rather windows itself.
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
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.
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.
I am a geology student and am trying to come up with a program for illustrating joint networks in rock masses.
Basically I just need wxPython script, or any snippets of script that would be able to create a GUI program which displays a number of disks inside a box, with the parameters (ie relative position, orientation and radius) of the disks being input at the beginning. Does anyone know of any script like that, or if thats even possible? My problem is that this is for my thesis, and although I have dabbled in Python before, not on anything anywhere near as complex as this, and certainly not GUI. I literally don't even know where to begin trying to display geometric shapes.
I unfortunately don't have the time to learn enough wxPython to do this, I'm looking for any pre-written example code. I have downloaded wxPython and have done some tutorials on creating message windows etc but now I'm not sure where to look for help now. Any advice/tips/code at ALL would be greatly appreciated, I am desperate for help!
I'm not sure I understand exactly what you are trying to do here. Are you creating an interactive GUI or just a visualization? It sounds like you want something in 3D. In that can you should check out VPython which has some tutorials and demo code. Also much more powerful is PyOpenGL. For something and actual 2D user interface in wxPython you should really look through the demo code included with wxPython. There is quite a nice library of complete examples with source code that you can just copy and modify. I am pretty sure there are some examples for drawing polygons of arbitrary size/shape.