Articles tagged with tkinter

This is the updated version of the Tiny Tkinter Calculator. It has more power, since you can type in functions contained in the Python math module then press the equals key. You can then move the result into memory for other calculations. The code is written in OOP class style ...

I would like the widgets on the window to expand as you expand the window. I know you can do it with the pack method but I'm using the grid method to arange my widgets. Pack Method: ... Grid Method I'm using: ...

I needed a calculator and I didn't want to use google since my internet is slow. So I made one! Here it is. Working with it is simple. Use the number and operation keys("c" for clear, "p" for pi, and "s" for sqrt) as well as the return and enter ...

I am implementing the last feature of my Python Checkers Game, which is to require the user to make multiple jumps. For captures, I do the following: ... But it ends up being stuck in an infinite loop! ... Here is the full code: ...

This 'sticky' thread is for working examples of Python GUI code. Note that wxPython examples have their own sticky. Please use comments in your code to help the reader. The example code should be usable as a template, so folks get a feel for the toolkit and can use those ...

I have a tkinter app that has 2 frames. The frame on the left has a bunch of buttons and the frame on the right has a text widget. I use the create_buttons function below to make the buttons. Is there a way to have the button stay sunken when ...

The Tkinter GUI toolkit comes with a scrolled text widget that is called ScrolledText. To get access to it you have to import it separately. It allows you to display large amounts of text in a small space.

I have a Tkinter GUI that is composed of two widgets, the first is a widget class with an entry field and a button and the second is a scrollable text widget class. I have combined these two widget classes to make a single GUI. Each of these widget classes ...

Hi everybody. I have problem with .pack() and .grid(). I have to use this line: ... I have used .grid every where on my file but now here i have copied a pice of code from some where and have pasted to my file, as you see it has used ...

Hello. When we want to insert a vlue into a table in sqlite, we use this line, right? ... As we can see above, we want to insert 2 words and we type them as when we are typing whole the codes. But i want to get 2 words from ...

Hi, is that possible Tkinter to play a video? And if not possible so what GUI programming that you can recomended? I already search in google, find a few but there's dead link.. I need to show 2 windows, first the original video, and the second is video after processing

Hello. I have used ScrolledText in my code, the scroll bar that appears is attached to the frame and although it scrolls the text box contents, I want that it was attached to the text widget itself. What can i do?

Hello friends :) I'm almost familiar with Tkinter and Kivy frameworks, but i'm looking for other python GUI frameworks, soething better than Tkinter. Kivy is also great but i need to watch more tutorial videos and i'm not able to do that right now. Can you introduce a better and ...

Hi everybody. How can i install ttk module on linux? When i try to import and use it on my Tkinter window, the error says sth like there is no module named ttk. So it means i should install it right?! I'm using python 2. I want to use ttk ...

Hi friends! I'm coding a program; i have a Tkinter window with a view button and i can add names with entry box and add button into a list that will be saved on a db file. Now i want the program to show the list names otomaticly when the ...

Hello! My this time question is about breaking a list. I have a list with the name favorite_movies. Here is 2 functions of all functions from the file: ... When i append a name with the Add button and then press the View button, i see list's names on the ...

Hi everybody! How can i call a function from Tkinter without using Buttons? I have a test.py file and there is a function def message in it: ... I want to type test.py message from linux terminal and the good morning message display on a window. What should i do? ...

Hi. I am not exactly new to python but I have never done anything related to time and I don't know how. I want to make a count down timer that starts when I start a program and then either closes when I close the program or when it counts ...