0

I made a GUI, to control an electronic instrument I designed, which has different buttons for different states. I also made a python script to control that instrument. What I want to do is that when I send a command to the instrument to change its state, the GUI should also show the change by changing the radio button selection. I just want to trigger the radio button click event externally from a different file. Is it possible?

Thanks,

Jatin.

2 Answers2

0

You can use wx.Post event, as discussed here, for example.

Personally, I find it easier to directly set the radio button gui using SetValue, and then directly call the handler (that you set in the Bind statement).

Community
  • 1
  • 1
tom10
  • 67,082
  • 10
  • 127
  • 137
0

I recommend using PubSub ( http://www.blog.pythonlibrary.org/2010/06/27/wxpython-and-pubsub-a-simple-tutorial/ ) or wx.PostEvent for that sort of thing.

Mike Driscoll
  • 32,629
  • 8
  • 45
  • 88