tkinter.style

ttk.OptionMenu outer border around the menu

旧巷老猫 提交于 2021-01-28 20:01:14
问题 I try to style a tkinter gui, first this gui is not easy to modify. I reach the styling i want for the widgets i use, except for one think. I get lock about this light gray border around the Menu in the ttk.OptionMenu widget. How removing or coloring it ? Python 3x on Windows 10 Here just the relevant parts of the code. Some common styling: self.style = ttk.Style(self) self.style.theme_use("clam") self.font12 = tkFont.Font(family="helvetica", size=12) self.font14 = tkFont.Font(family=

Customization of Tkinter ttk background style is not being shown

夙愿已清 提交于 2021-01-20 08:55:09
问题 In the following code, the show_widget_validity() function either applies a custom style that has just a change to the background color of a widget's existing style, or restores the original style. This is a library routine, so does not take complete control of the style. The background color appears to be reconfigured correctly, as shown by the background style description reported in the entry widget after each change. However, the actual background color of the widget does not change. This

Is it possible to have a standard style for a widget?

走远了吗. 提交于 2021-01-11 00:07:36
问题 I want all of the buttons in my gui to have the same style. Right now I manually write in the attributes I want but it takes up so much space. Also, if I wanted to change the style I would have to go to every single button. Is it possible to have a style i define once and then reference it when making all buttons? Something like the following: basic_style = {'background': 'blue', 'foreground':'white', 'font':'Helvetica 8 bold'} self.btn = tk.Button(text = 'Hello', style = basic_style) I know

Is it possible to have a standard style for a widget?

瘦欲@ 提交于 2021-01-11 00:06:40
问题 I want all of the buttons in my gui to have the same style. Right now I manually write in the attributes I want but it takes up so much space. Also, if I wanted to change the style I would have to go to every single button. Is it possible to have a style i define once and then reference it when making all buttons? Something like the following: basic_style = {'background': 'blue', 'foreground':'white', 'font':'Helvetica 8 bold'} self.btn = tk.Button(text = 'Hello', style = basic_style) I know

Is it possible to have a standard style for a widget?

夙愿已清 提交于 2021-01-11 00:02:52
问题 I want all of the buttons in my gui to have the same style. Right now I manually write in the attributes I want but it takes up so much space. Also, if I wanted to change the style I would have to go to every single button. Is it possible to have a style i define once and then reference it when making all buttons? Something like the following: basic_style = {'background': 'blue', 'foreground':'white', 'font':'Helvetica 8 bold'} self.btn = tk.Button(text = 'Hello', style = basic_style) I know

Is it possible to have a standard style for a widget?

蓝咒 提交于 2021-01-10 23:53:52
问题 I want all of the buttons in my gui to have the same style. Right now I manually write in the attributes I want but it takes up so much space. Also, if I wanted to change the style I would have to go to every single button. Is it possible to have a style i define once and then reference it when making all buttons? Something like the following: basic_style = {'background': 'blue', 'foreground':'white', 'font':'Helvetica 8 bold'} self.btn = tk.Button(text = 'Hello', style = basic_style) I know

Is it possible to have a standard style for a widget?

ⅰ亾dé卋堺 提交于 2021-01-10 23:49:21
问题 I want all of the buttons in my gui to have the same style. Right now I manually write in the attributes I want but it takes up so much space. Also, if I wanted to change the style I would have to go to every single button. Is it possible to have a style i define once and then reference it when making all buttons? Something like the following: basic_style = {'background': 'blue', 'foreground':'white', 'font':'Helvetica 8 bold'} self.btn = tk.Button(text = 'Hello', style = basic_style) I know

A customized menu bar without using the widget tk.Menu

巧了我就是萌 提交于 2020-07-03 04:24:10
问题 I would like to personalized a menu bar. For example I want to delete the border that appears around the tk.Menu widget (with the add_command() method) That's my code (I'm using Windows 10) import tkinter as tk from tkinter import ttk dark_grey = "#212121" dark_blue="#102A43" blue_1="#243B53" root = tk.Tk() root.state('zoomed') container = tk.Frame(root, bg = dark_grey) container.grid_rowconfigure(0, weight = 0) container.grid_columnconfigure(0, weight = 1) menu_frame = tk.Frame(container, bg

TKinter Style & Treeview Click Issues

我与影子孤独终老i 提交于 2020-05-14 02:01:33
问题 I am struggling with styles in TKinter My main problem is that you cannot click anything in the treeview. To test, simply press the "Press To Test" Button For some reason it looks like, style.theme_create takes over my treeview widget, and no matter what I try, I cannot seem to find a solution around it. I tried activating the cursor, selection_set, focus_set, etc. If I comment the style I can click, but not with it on. I am still quite new to python and would appreciate some insight. I tried

TKinter Style & Treeview Click Issues

半腔热情 提交于 2020-05-14 02:00:09
问题 I am struggling with styles in TKinter My main problem is that you cannot click anything in the treeview. To test, simply press the "Press To Test" Button For some reason it looks like, style.theme_create takes over my treeview widget, and no matter what I try, I cannot seem to find a solution around it. I tried activating the cursor, selection_set, focus_set, etc. If I comment the style I can click, but not with it on. I am still quite new to python and would appreciate some insight. I tried