tkinter-macos

`tkinter._test()` buttons are invisible when using pipenv

↘锁芯ラ 提交于 2020-05-15 06:21:07
问题 I'm learning Tkinter right now and trying to work through my first issue, but finding Google hasn't been helpful. I'm running this code on Mac OS X 10.15.1 (Catalina) I'm using Python 3.7 and my code looks like so (lots of boilerplate per PEP8 standards): """ Experiments in tkinter """ import tkinter as tk def main(): """ Main entrypoint """ tk._test() if __name__ == "__main__": main() This outputs the following warning to the console: DEPRECATION WARNING: The system version of Tk is

`tkinter._test()` buttons are invisible when using pipenv

北城余情 提交于 2020-05-15 06:19:44
问题 I'm learning Tkinter right now and trying to work through my first issue, but finding Google hasn't been helpful. I'm running this code on Mac OS X 10.15.1 (Catalina) I'm using Python 3.7 and my code looks like so (lots of boilerplate per PEP8 standards): """ Experiments in tkinter """ import tkinter as tk def main(): """ Main entrypoint """ tk._test() if __name__ == "__main__": main() This outputs the following warning to the console: DEPRECATION WARNING: The system version of Tk is

Why aren't these tkinter stylings working?

夙愿已清 提交于 2020-01-24 15:18:05
问题 * To eliminate any confusion, I am using macOS Catalina, Python 3.7.4, and Tcl/Tk 8.6.9 * I have a project that uses 'black' as a theme from ThemedTK in ttkthemes. I am trying to modify the styling for the buttons. However, I have not been able to figure out how to modify the theme beyond the set_theme_advanced() method, which only changes the colors from what I am reading here. I want to change the button text to be centered within the theme. But, in the process of troubleshooting this, I

Tkinter checkbutton - text won't show up

試著忘記壹切 提交于 2020-01-22 02:47:28
问题 When I try to use a checkbutton it works fine but the text won't appear. I can't understand why. Below is my code from tkinter import * a = Tk() var1 = IntVar() Checkbutton(a, text="checkbutton", variable=var1, fg='blue').grid(row=0,sticky=W) a.mainloop() The checkbox appears but the text alongside does not 回答1: Try using themed tk (ttk) checkbutton widget: import tkinter as tk from tkinter import ttk a = tk.Tk() var1 = tk.IntVar() check_btn = ttk.Checkbutton(a, text="checkbutton", variable