for i, item in enumerate(Tehdit, 1): if i < 26: lbl = Label(project, text=f"{i}. {item}", font="Arial 10") lbl.place(x=0, rely=0.22 + ((i-1) * 0….
Tag: tkinter
Tkinter Listbox: manipulate display of rows (or display one column but `curselection` another from same dataframe)
I am currently displaying in a Listbox a column of a pandas DataFrame which contains the full path of some files I need to work on. Right now it all works fine because I am displaying the full path in the Listbox, so that in my on_select I get the full path as current_selection_text and I can work on this
How to configure map for all ttk widgets except TButton?
I am creating a GUI with Tkinter and ttk, and I’m trying to create a custom map to make ttk widgets blue on hover. I could apply that to all widgets with passing “.” as the first argument to ttk.Style().map(…). But now I want to exclude TButton from this query. That is, I need to make all widgets but TButton
How can I get a row in Sqlite3 table with Tkinter Listbox widget?
I have Python program connected to Sqlite3 database with Tkinter on the frontend. My database table (subjectlist) consists of four columns: [id (unique interger), subject (text), serial (unique interger), is_active (boolean interger)]. Here is my program: Currently at runtime when I click item on listbox (which basically shows all subject column values that have is_active=1 on the same row) and
How do I call a separate python program using a button in tkinter?
I want to create a button in tkinter and when pressed, have that button call a different program into this program. (this is just an example) Say I have the one program that shows the button that says “Square root” and I have another program that takes a number such as: 4, using the input() function, and finds the square
How can I make program a bit cleaner?
I have this pretty ugly program (really cluttered) is there any way I could make it cleaner, less cluttered, etc. Thanks! P.S. (If you want to try to run this program prepare to be amazed.) Answer First of all, nice work with the drawing! Here is my suggestion: Things for you to try next: Making the elements size relative to
How can I get the value of a row in a column in SQLite 3 table with Tkinter Listbox widget?
I have Python program connected to SQLite 3 database with Tkinter on the frontend. My database table (subjectlist) consists of three columns: [id (unique interger), subject (text), serial (unique integer)]. Here is my program: Currently at runtime when I click item on listbox (witch basically shows all subject column values) and then press Tkinter button I get the subject I
TKinter Entry validation not working after setting its StringVar
I have a TKinter entry widget where i want to validate the input, and everything works as expected. But when I set the StringVariable of the Entry widget the validation function is no more called. Can someone explain me this behavior? Here is an example of my problem where i validate whether the input is a digit or not I
tkinter: immediately selecting newly opened window
The code is simple. In tkinter I create a button which opens a new window. The difference in the pictures below might be hard to see but if you look closely you can see that in the first picture the root window is selected even though it’s behind the new opened window. In my actual program I use keybindings to
Buttons in tkinter – When clicked: reveal something behind it
I am new to python and tkinter. I’m looking to make a simple window with a few buttons. When a button is pressed, I wish for it to disappear and instead reveal something behind it, a number, for instance. How do I go about doing this? Below is an example code which generates a window with a button. Can I