I'm using Tkinter with a progress bar.

I've got the code below with the **"callback" function** that adding 50% to my progress bar.
I would like to **limit the function to work only once for each OptionMenu selection**.

Currently, I can click twice on the first OptionMenu and get to 100% in the progress bar.
Does anyone know what I should change in the "callback" function in order to make it work only once for each OptionMenu? No matter how many times the user has clicked to change its selected value.

[![enter image description here](https://i.stack.imgur.com/aVgvA.jpg)](https://i.stack.imgur.com/aVgvA.jpg)

```
from tkinter import *
from tkinter.ttk import Progressbar

root = Tk()
root.title('Input window V1')
root.geometry('600x400')
root.resizable(False, False)

frame = Frame(root, width=600, height=400)
frame.configure(background="gray28")
frame.pack(fill=BOTH, expand=True)

progress = Progressbar(root, orient=HORIZONTAL, length=300, mode='determinate')
progress.place(x=150, y=15)

Budget = {'Flexible', 'Variable', 'Fixed'}
Commitment = {'High', 'Medium', 'Low'}

def callback(*args):
    progress["value"] += 50

bottom_header = Label(root, bg="gray28", fg="white", pady=3,
                  font=("Helvetica", 20, 'underline'), text='Please fill the following attributes:')
bottom_header.place(x=110, y=100)

lbl1 = Label(root, bg="gray28", text='Budget:', fg="cyan2", font=("Helvetica", 14))
lbl1.place(x=120, y=200)

lbl2 = Label(root, bg="gray28", text='Commitment:', fg="cyan2", font=("Helvetica", 14))
lbl2.place(x=120, y=240)

var1 = StringVar(root)
pl1 = OptionMenu(root, var1, *Budget)
pl1.config(width=20, bg="GREEN", fg="white")
pl1.place(x=250, y=200)

var1.trace("w", callback)

var2 = StringVar(root)
pl2 = OptionMenu(root, var2, *Commitment)
pl2.config(width=20, bg="GREEN", fg="white")
pl2.place(x=250, y=240)

var2.trace("w", callback)

global var_dict

var_dict = dict(Budget=var1,
                Commitment=var2)

button1 = Button(root, text="Test")
button1.config(width=25, bg="white")
button1.place(x=220, y=320)

root.mainloop()

```

Thanks in advance!