Been trying to figure this one out for a while. I am trying to click a button (wx.button) in my wx.Frame to move the selection of a Object List View (OLV) with self_list._SelectAndFocus(i). The button is clicked from a MCU and i can see the click going though.
Tried using this code
evt = wx.PyCommandEvent(wx.EVT_BUTTON.typeId, self.button3.GetId())
wx.PostEvent(self.button3, evt)
The event goes through but the ObjectListView is not responding. Clicking another button with the mouse in wxpython works just fine. Seems to me that the PostEvent is not going through like a regular mouse click on a button.
I also tested it with:
self.uisim = wx.UIActionSimulator()
self.uisim.MouseMove(1200,650)
self.uisim.MouseClick(1)
Forcing a mouse click on the respected button and this works. I fear there is a limitation to the OLV, any tips?
It might also be that i am running multiple threads with
tester = Atem()
main = MainFrame(self)
thread = Thread(target=tester.RunCode)
thread2 = Thread(target=main.cutmonitor)
# thread3 = Thread(target=main.test2)
thread.daemon = True
thread2.daemon = True
# thread3.daemon = True
thread.start()
thread2.start()
row_items = self.list.GetItemCount()
Been trying to figure this one out for a while. I am trying to click a button (wx.button) in my wx.Frame to move the selection of a Object List View (OLV) with self_list._SelectAndFocus(i). The button is clicked from a MCU and i can see the click going though.
Tried using this code
evt = wx.PyCommandEvent(wx.EVT_BUTTON.typeId, self.button3.GetId()) wx.PostEvent(self.button3, evt)
The event goes through but the ObjectListView is not responding. Clicking another button with the mouse in wxpython works just fine. Seems to me that the PostEvent is not going through like a regular mouse click on a button.
It might also be that i am running multiple threads with
tester.RunCode is where i start the MCU loop thread and main.cutmonitor is where i get the data from the button of the MCU. So cutmonitor is monitoring the button on the MCU and every time this button is pressed self_list._SelectAndFocus(i) is iterating with 1. i=1, i=2 and so on.
--
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to wxpython-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.