# -*- coding: utf-8 -*- import tkinter as tk import tkinter.ttk as ttk root = tk.Tk() root.title("tk29.py") root.geometry("300x200") ##################################### def mul(): m = var1.get()*var2.get() lb.config(text = "Product = {}".format(m)) var1 = tk.DoubleVar() sc1 = tk.Scale(root, variable = var1, orient = 'horizontal', length =150, resolution = 0.01) sc1.pack(anchor = tk.CENTER) var2 = tk.DoubleVar() sc2 = ttk.Scale(root, from_ = 0, to = 100, variable = var2, orient = 'horizontal', length = 150) sc2.pack(anchor = tk.CENTER) ttk.Label(root, textvariable = var2).pack(anchor = tk.CENTER) bt = ttk.Button(root, text = 'button', command = mul) bt.pack() lb = ttk.Label(root, text = 'label') lb.pack() ##################################### root.mainloop()