I have a specific question on the Checkbox object in pySimplegui and Tkinter.
For reference on I'm a Windows 10 computer. Python version 3.9.2 PySimpleGUI version 4.57.0 tkinter 8.6.9
Here are 2 coding examples
First is tKinter:
import tkinter as tk
window = tk.Tk()
window.title('My Window')
window.geometry('100x100')
c1 = tk.Checkbutton(window, text='Checkbox Text', onvalue=1, offvalue=0, pady=40)
c1.pack()
window.mainloop()
Second is pySimplegui:
import PySimpleGUI as sg
layout = [[sg.Checkbox('Checkbox Text')]]
window = sg.Window("Small Checkbox", margins=(40,40), layout=layout, finalize=True)
while True:
event, values = window.read()
if event == sg.WIN_CLOSED:
break
window.close()
When using tKinter and clicking on the Checkbox, the text remains on the screen (non flashing).
When using pySimplegui and clicking on the Checkbox, the text turns on and off quickly (flashes).
I'm trying to eliminate that flashing when using the Checkbox in pySimplegui. Any suggestions?
I have not been able to solve this.
Aucun commentaire:
Enregistrer un commentaire