Hello. I'm just learning Python. I have confronted a problem in my study.
I have an optionlist for building types (Residential, Museum, Hospital, Hotel etc.) but I need to convert these building types into numbers (fire load 'MJ/kg').
In other words, I want each building type to have its own "Numerical data of fire load".
For example, I would like "Museum" to appear in the option list, but when I select the museum, "100" should be written in the relevant entry.
How can it be done? Thank you in advance.
I have an optionlist for building types (Residential, Museum, Hospital, Hotel etc.) but I need to convert these building types into numbers (fire load 'MJ/kg').
In other words, I want each building type to have its own "Numerical data of fire load".
For example, I would like "Museum" to appear in the option list, but when I select the museum, "100" should be written in the relevant entry.
How can it be done? Thank you in advance.

options_list = {"Museum": 100, "School": 200, "Library": 300, "House": 400, "Bath": 500} value_inside = tkinter.StringVar(Variable) value_inside.set("Pick a Building Type") question_menu = tkinter.OptionMenu(window, value_inside, *options_list) question_menu.place(x=395, y=253) building_types = tkinter.Entry(window, textvariable=value_inside, state=NORMAL, bd=5, fg='black', font=("Helvetica", 12, BOLD)) building_types.place(x=292, y=255, width=100, height=30)
Larz60+ write Jan-29-2023, 11:21 PM:
Please post all code, output and errors (it it's entirety) between their respective tags. Refer to BBCode help topic on how to post. Use the "Preview Post" button to make sure the code is presented as you expect before hitting the "Post Reply/Thread" button.
Fixed for you this time. Please use bbcode tags on future posts. Thank you
Please post all code, output and errors (it it's entirety) between their respective tags. Refer to BBCode help topic on how to post. Use the "Preview Post" button to make sure the code is presented as you expect before hitting the "Post Reply/Thread" button.
Fixed for you this time. Please use bbcode tags on future posts. Thank you