Python Forum

Full Version: Tkinter menu font size -method to change
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

        How can I change the Tkinter menu font size, I can change the font size of other components , except menu Huh Huh Huh
import tkinter as tk
from tkinter import ttk
from tkinter import *
import tkinter.font as tkfont
root = tk.Tk()
root.option_add("*Font", ('Verdana', 30))
label = tk.Label(root, text = "Hello World")
label.pack(padx = 5, pady = 5)
menubar = tk.Menu(root)
menubar.add_command(label="Python", command=lambda: print("Python"))
menubar.add_command(label="Quit", command=root.destroy)

self.file.add_command = (font = 'Helvetica 12 bold')
(Oct-10-2020, 06:30 PM)Maryan Wrote: [ -> ]ex.
self.file.add_command = (font = 'Helvetica 12 bold')

Thanks !

I change it to class , it works for the level of submenu, fonts.. but the parent menu object (Main, File and testl), not work. , ….. Huh Huh Huh
from tkinter import *
class tiger:
    def __init__(self): = Tk()
      = Menu(,font= 'Helvetica 50 bold')                     # no effect
        self.main_menu = Menu(, tearoff=0,font= 'Helvetica 50 bold')   # no effect
        self.main_menu .add_command(label="StartScreen",font= 'Helvetica 25 bold')
        self.main_menu .add_command(label="Settings",font= 'Helvetica 25 bold')
        self.main_menu .add_command(label="Exit",font= 'Helvetica 25 bold')"Main", menu=self.main_menu,font= 'Helvetica 50 bold')
        #self.file.add_command = (font = 'Helvetica 12 bold')
        self.file_menu = Menu(, tearoff=0,font= 'Helvetica 50 bold')  #no ettect
        self.file_menu.add_command(label="Open",font= 'Helvetica 25 bold')
        self.file_menu.add_command(label="Save",font= 'Helvetica 25 bold')
        self.file_menu.add_command(label="Print",font= 'Helvetica 25 bold')"File", menu=self.file_menu)
        self.test_menu = Menu(, tearoff=0,font= 'Helvetica 50 bold')  # no effect
        self.test_menu.add_command(label="Test")"Test", menu=self.test_menu)
difficult stuff for me to solve... Wall Wall Wall