制作按钮保持在Pysimplegui中
我配置了这3个按钮,它们基本上是3个选项,您一次只能有1个活动。我正在尝试采取以下行为:当单击一个行为时,应保持单击直到单击另一个行为,这甚至可能吗?
# Settings Buttons layout
settingsButtonsLine = [
[psg.Button("CITY ROAD", size=(20, 7), button_color='Gray', font=mainFont),
psg.Button("NORMAL ROAD", size=(20, 7), button_color='Gray', font=mainFont),
psg.Button("HIGHWAY", size=(20, 7), button_color='Gray', font=mainFont)]
]
I have these 3 buttons configured, and they are basically 3 options from which you can only have 1 active at a time. I'm trying to have the following behavior: when one is clicked, it should remain clicked until another one is clicked, is this even possible?
# Settings Buttons layout
settingsButtonsLine = [
[psg.Button("CITY ROAD", size=(20, 7), button_color='Gray', font=mainFont),
psg.Button("NORMAL ROAD", size=(20, 7), button_color='Gray', font=mainFont),
psg.Button("HIGHWAY", size=(20, 7), button_color='Gray', font=mainFont)]
]
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论