Questions tagged [Tkinter] (88)

1
answer

As for sqlite3 to make the right delete rows?

my code is the following: #array_set[0] - gives the desired ID (taken from tk.treeview) - works like a clock self.c.execute("""DELETE FROM table WHERE id = ?; """,array_set[0]) self.tree.delete(self.tree.selection()) self.conn.commit() self.conn.close() The problem is that deleted only if if ID < 10. tobish if the ID f...
winona_Goldner11 asked April 19th 20 at 12:19
2
answers

How to color Pisces with a Canvas in tkinter?

I need to know the color of the pixel on the Canvas using coordinates in Tkinter (for example the color of the pixel at x=1 and y=1 ) Code to test: from tkinter import * root = Tk() canv = Canvas(bg="white") canv.grid(columnspan=3) nujniy_cvet = #what to write here to get the color value at coordinates x=1, y=1? print...
marlee.Nolan19 asked April 18th 20 at 12:22
0
answer

How to make Entry['state'] = DISABLED when clicking the Checkbutton?

Creates N rows and checkboxes. Each checkbox is to the left of the line and need to by clicking on the tick line has been DISABLED. Tried printout the indexes of the checkboxes by clicking on them, but left the number of the last element.How to bind keypress to when the function was part of the index of this checkbox, and n...
peyton_Upton asked April 18th 20 at 12:21
4
answers

Python for beginners: a tutorial there to create the GUI?

Studying Python. Prior to that, he was familiar with PHP, but there is a great desire to start writing Windows/Linux/MacOS application. Read the book E. Matiz - learning Python. Game programming, data visualization, web applications In General, basic knowledge of Python there, but how to create a GUI is unfortunately not ve...
marlin37 asked April 18th 20 at 12:20
1
answer

How to make a condition in the calculator when the button '=' is pressed twice in a row, it is necessary to remove all and leave only what is after the '='?

Example 12-8=4 after the second tap there is only 4 from tkinter import * from tkinter import messagebox from tkinter import ttk import math clicks = 0 root = Tk() root.title('Calculator') def doubleclick(): global clicks clicks += 1 return clicks def convert_base(num, to_base=10, from_base=10): # first convert t...
earl_Towne71 asked April 16th 20 at 10:25
1
answer

How to check the username and password?

from tkinter import * from tkinter import messagebox logins = ["user0", "user1"] passwords = ["pass0", "pass1"] #functions that must be done when you enter username and password def messagebox1(): messagebox.showinfo("ERROR", "invalid USERNAME OR PASSWORD") def messagebox0(): messagebox.showinfo("congratulate you walk...
unique83 asked April 8th 20 at 17:41
0
answer

Why cx_freeze does not compile program with tkinter?

Code collector: import sys from cx_Freeze import setup, Executable import os os.environ['TCL_LIBRARY'] = r'C:\Users\2qwen\AppData\Local\Programs\Python\Python37\tcl\tcl8.6' os.environ['TK_LIBRARY'] = r'C:\Users\2qwen\AppData\Local\Programs\Python\Python37\tcl\tk8.6' buildOptions = dict( packages = ["os", "tkinter"], exc...
Joey45 asked April 8th 20 at 17:28
0
answer

How to make tk.Treeview proportionally to the window?

Good evening! Here's a snippet: self.tree = ttk.Treeview(self, columns=('ID', 'authors', 'name', 'ISBN', 'publisher', 'year','quantity'), height=15, show='headings') self.tree.column('ID', width=30, anchor=tk.CENTER) self.tree.column('authors', width=92+31+21+21 anchor=tk.CENTER) self.tree.column('name', width=92+31+21+...
allison asked April 8th 20 at 17:26
1
answer

How you can quickly change the text Label (Tkinter) (Datetime)?

Make electronic watch. Have made a variable Label and text = (date_time.hour, minute, second), so they were always updated wrote: while True: TimeHour = Label(root, text=date_time.hour, width=5, height=2,font=('Verdana', 16, 'bold')) TimeMinute = Label(root, text=date_time.minute, width=5, height=2,font=('Verdana', 16, '...
Josefina.Swaniawski50 asked April 8th 20 at 10:15
0
answer

How to limit the number of characters entered in the Entry box tkinter?

Hello. How can I limit the number of characters when entering numbers in Entry box tkinter?
Violet asked April 8th 20 at 09:26