from tkinter import *
from tkinter.ttk import *

def calculate(*args):
    try:
        x_calc = int(x.get())
        y_calc = int(y.get())
        result.set(x_calc + y_calc)
    except ValueError:
        pass

# Skapar main fönstret
root = Tk()
root.title("Feet to meters")

s = Style()
s.configure("BW.TLabel", foreground="", background="dark orchid")

# mainframe är mitt huvud fönster.
mainframe = Frame(root, padding="3 3 12 12", style="BW.TLabel") # Paddingen mot root
mainframe.grid(column=0, row=0, sticky=(N, W, E, S))
root.columnconfigure(0, weight=1)
root.rowconfigure(0, weight=1)

x = IntVar()
y = IntVar()
result = StringVar()

x_entry = Entry(mainframe, width=5, textvariable=x)
y_entry = Entry(mainframe, width=5, textvariable=y)

x_entry.grid(column=1, row=1, sticky=(W, E))
y_entry.grid(column=2, row=1, sticky=(W, E))

Label(mainframe, textvariable=result, style="BW.TLabel").grid(column=2, row=2, sticky=(W, E))
Button(mainframe, text="Calculate", command=calculate).grid(column=3, row=1, sticky=W)

root.mainloop()

c942e9bea9fd1934a422c746de5dd789c6b30177
<mask token>


def calculate(*args):
    try:
        x_calc = int(x.get())
        y_calc = int(y.get())
        result.set(x_calc + y_calc)
    except ValueError:
        pass


<mask token>

<mask token>


def calculate(*args):
    try:
        x_calc = int(x.get())
        y_calc = int(y.get())
        result.set(x_calc + y_calc)
    except ValueError:
        pass


<mask token>
root.title('Feet to meters')
<mask token>
s.configure('BW.TLabel', foreground='', background='dark orchid')
<mask token>
mainframe.grid(column=0, row=0, sticky=(N, W, E, S))
root.columnconfigure(0, weight=1)
root.rowconfigure(0, weight=1)
<mask token>
x_entry.grid(column=1, row=1, sticky=(W, E))
y_entry.grid(column=2, row=1, sticky=(W, E))
Label(mainframe, textvariable=result, style='BW.TLabel').grid(column=2, row
    =2, sticky=(W, E))
Button(mainframe, text='Calculate', command=calculate).grid(column=3, row=1,
    sticky=W)
root.mainloop()

<mask token>


def calculate(*args):
    try:
        x_calc = int(x.get())
        y_calc = int(y.get())
        result.set(x_calc + y_calc)
    except ValueError:
        pass


root = Tk()
root.title('Feet to meters')
s = Style()
s.configure('BW.TLabel', foreground='', background='dark orchid')
mainframe = Frame(root, padding='3 3 12 12', style='BW.TLabel')
mainframe.grid(column=0, row=0, sticky=(N, W, E, S))
root.columnconfigure(0, weight=1)
root.rowconfigure(0, weight=1)
x = IntVar()
y = IntVar()
result = StringVar()
x_entry = Entry(mainframe, width=5, textvariable=x)
y_entry = Entry(mainframe, width=5, textvariable=y)
x_entry.grid(column=1, row=1, sticky=(W, E))
y_entry.grid(column=2, row=1, sticky=(W, E))
Label(mainframe, textvariable=result, style='BW.TLabel').grid(column=2, row
    =2, sticky=(W, E))
Button(mainframe, text='Calculate', command=calculate).grid(column=3, row=1,
    sticky=W)
root.mainloop()

from tkinter import *
from tkinter.ttk import *


def calculate(*args):
    try:
        x_calc = int(x.get())
        y_calc = int(y.get())
        result.set(x_calc + y_calc)
    except ValueError:
        pass


root = Tk()
root.title('Feet to meters')
s = Style()
s.configure('BW.TLabel', foreground='', background='dark orchid')
mainframe = Frame(root, padding='3 3 12 12', style='BW.TLabel')
mainframe.grid(column=0, row=0, sticky=(N, W, E, S))
root.columnconfigure(0, weight=1)
root.rowconfigure(0, weight=1)
x = IntVar()
y = IntVar()
result = StringVar()
x_entry = Entry(mainframe, width=5, textvariable=x)
y_entry = Entry(mainframe, width=5, textvariable=y)
x_entry.grid(column=1, row=1, sticky=(W, E))
y_entry.grid(column=2, row=1, sticky=(W, E))
Label(mainframe, textvariable=result, style='BW.TLabel').grid(column=2, row
    =2, sticky=(W, E))
Button(mainframe, text='Calculate', command=calculate).grid(column=3, row=1,
    sticky=W)
root.mainloop()

from tkinter import *
from tkinter.ttk import *

def calculate(*args):
    try:
        x_calc = int(x.get())
        y_calc = int(y.get())
        result.set(x_calc + y_calc)
    except ValueError:
        pass

# Skapar main fönstret
root = Tk()
root.title("Feet to meters")

s = Style()
s.configure("BW.TLabel", foreground="", background="dark orchid")

# mainframe är mitt huvud fönster.
mainframe = Frame(root, padding="3 3 12 12", style="BW.TLabel") # Paddingen mot root
mainframe.grid(column=0, row=0, sticky=(N, W, E, S))
root.columnconfigure(0, weight=1)
root.rowconfigure(0, weight=1)

x = IntVar()
y = IntVar()
result = StringVar()

x_entry = Entry(mainframe, width=5, textvariable=x)
y_entry = Entry(mainframe, width=5, textvariable=y)

x_entry.grid(column=1, row=1, sticky=(W, E))
y_entry.grid(column=2, row=1, sticky=(W, E))

Label(mainframe, textvariable=result, style="BW.TLabel").grid(column=2, row=2, sticky=(W, E))
Button(mainframe, text="Calculate", command=calculate).grid(column=3, row=1, sticky=W)

root.mainloop()
