I want to replace a dropdown with the user clicking an option instead.
I currently have this:
Here's my code (contains pseudocode because I don't know how "deselecting" would work either:
import PySimpleGUI as sg
layout = [
[ sg.Text("Testing") ],
[sg.Input(key="in")],
[ sg.Text ("Language?"), sg.Button("German", key="ger"), sg.Button("French", key="fr")],
]
window = sg.Window("This is for testing purposes", layout)
while True:
event, values = window.read()
if event == sg.WINDOW_CLOSED:
break
if event == "ger":
deselect("fr") if "fr" is selected
option = "german"
...
if event == "fr":
deslect("ger") if "ger" is selected
option = "french"
...
In short, I want to switch from dropdown selection to buttons that show the user that they're currently selecting button X as their option, and if they select another button (button Y), then it would unselect button X and show that button Y is now selected instead.